$Inflate: Difference between revisions
m (1 revision) |
mNo edit summary |
||
Line 2: | Line 2: | ||
<span class="pageSubtitle"><section begin="desc" />Decompress a longstring with inflate<section end="desc" /></span> | <span class="pageSubtitle"><section begin="desc" />Decompress a longstring with inflate<section end="desc" /></span> | ||
<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Inflate function is [[ | <p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Inflate function is the [[Inflate (String function)]].</p> | ||
This function takes a deflated longstring input and decompresses it using the "inflate" algorithm. The inflate algorithm is described as part of the deflate specification in RFC 1951. | This function takes a deflated longstring input and decompresses it using the "inflate" algorithm. The inflate algorithm is described as part of the deflate specification in RFC 1951. | ||
The $Inflate function accepts one argument and returns a longstring result. The argument is the longstring to be decompressed, and it is required. | The $Inflate function accepts one argument and returns a longstring result. The argument is the longstring to be decompressed, and it is required. | ||
==Syntax== | ==Syntax== | ||
<p class="syntax"><section begin="syntax" /> %LSTRC = $Inflate(%lstr, option) | <p class="syntax"><section begin="syntax" /> %LSTRC = $Inflate(%lstr, option) | ||
Line 17: | Line 16: | ||
Usage | ==Usage== | ||
<ul> | <ul> | ||
<li> If the input string is not a valid deflated string, the request is cancelled. | <li> If the input string is not a valid deflated string, the request is cancelled. | ||
<li> If compression is not enabled for the current run, the request is cancelled. | <li> If compression is not enabled for the current run, the request is cancelled. | ||
Line 25: | Line 24: | ||
<li> 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 . | <li> 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 . | ||
</ul> | </ul> | ||
In the following example, %LSTR is set to the uncompressed version of the given string: | In the following example, %LSTR is set to the uncompressed version of the given string: | ||
Line 42: | Line 40: | ||
<li>[[Japanese functions]]</li> | <li>[[Japanese functions]]</li> | ||
<li>[[Sir2000 Field Migration Facility]]</li> | <li>[[Sir2000 Field Migration Facility]]</li> | ||
</ul> | </ul> | ||
<p class="caption">Products authorizing $Inflate | <p class="caption">Products authorizing $Inflate | ||
</p> | </p> | ||
[[Category:$Functions|$Inflate]] | [[Category:$Functions|$Inflate]] |
Revision as of 21:19, 1 February 2011
<section begin="desc" />Decompress a longstring with inflate<section end="desc" />
Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Inflate function is the Inflate (String function).
This function takes a deflated longstring input and decompresses it using the "inflate" algorithm. The inflate algorithm is described as part of the deflate specification in RFC 1951.
The $Inflate function accepts one argument and returns a longstring result. The argument is the longstring to be decompressed, and it is required.
Syntax
<section begin="syntax" /> %LSTRC = $Inflate(%lstr, option) <section end="syntax" />
Usage
- If the input string is not a valid deflated string, the request is cancelled.
- If compression is not enabled for the current run, the request is cancelled.
- The NCMPBUF parameter must be set by User 0 before the $Inflate function can be used. If $Inflate 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 .
In the following example, %LSTR is set to the uncompressed version of the given string:
%LSTRC = $Deflate('How much wood could a woodchuck chuck', - 'FIXED') %LSTR = $Inflate(%LSTRC)