$Deflate: Difference between revisions
(Automatically generated page update) |
m (→Products authorizing {{PAGENAMEE}}: fix "Sirius functions") |
||
Line 49: | Line 49: | ||
==Products authorizing {{PAGENAMEE}}== | ==Products authorizing {{PAGENAMEE}}== | ||
<ul class="smallAndTightList"> | <ul class="smallAndTightList"> | ||
<li>[[ | <li>[[Sirius Functions]]</li> | ||
<li>[[Fast/Unload User Language Interface]]</li> | <li>[[Fast/Unload User Language Interface]]</li> | ||
<li>[[Media:JoclrNew.pdf|Janus Open Client]]</li> | <li>[[Media:JoclrNew.pdf|Janus Open Client]]</li> | ||
Line 58: | Line 58: | ||
<li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li> | <li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li> | ||
</ul> | </ul> | ||
[[Category:$Functions|$Deflate]] | [[Category:$Functions|$Deflate]] |
Revision as of 21:59, 20 September 2018
Compress a longstring with Deflate
Note: Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Deflate function is the Deflate function.
This function compresses a longstring using the "deflate" algorithm. The deflate algorithm is described completely in RFC 1951. It is very effective with HTML and XML data.
The $Deflate function accepts two arguments and returns a longstring result.
Syntax
%lstrc = $Deflate(%lstr, option)
Syntax terms
%lstrc | The returned longstring. | ||||
---|---|---|---|---|---|
%lstr | The longstring to be compressed; it is required. | ||||
option | A string that describes the type of compression to perform on the longstring. This argument is optional; if it is not specified, DYNAMIC compression is used. Valid options and their meanings are:
|
Usage notes
- If an invalid option is passed, or compression is not enabled for the current run, the request is cancelled.
- The NCMPBUF parameter must be set by User 0 before the $Deflate function can be used. If $Deflate is called with NCMPBUF = 0, the request is cancelled.
- As with any compression scheme, it is possible that a particular string will become longer after compression. This would happen, for example, if a deflated string were passed to $Deflate.
- Short strings (less than 128 bytes) will typically compress better with the FIXED option.
Example
In the following example, %LSTRC is set to the compressed version of the given string:
%LSTRC = $Deflate('How much wood could a woodchuck chuck', 'FIXED')
Note: No other string or longstring functions can be usefully performed on the compressed string until it is decompressed with $Inflate.