$Inflate: Difference between revisions
m 1 revision |
No edit summary |
||
| (18 intermediate revisions by 3 users not shown) | |||
| Line 2: | Line 2: | ||
<span class="pageSubtitle">Decompress a longstring with inflate</span> | <span class="pageSubtitle">Decompress a longstring with inflate</span> | ||
<p class=" | <p class="warn"><b>Note: </b>Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Inflate function is the <var>[[Inflate (String function)|Inflate]]</var> 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 | The $Inflate function accepts one or two arguments and returns a longstring result. The first argument is the longstring to be decompressed, and it is required. | ||
==Syntax== | ==Syntax== | ||
<p class="syntax">< | <p class="syntax"><span class="term">%lstrc</span> = <span class="literal">$Inflate</span>(<span class="term">%lstr</span>, [<span class="term">option</span>]) | ||
< | </p> | ||
<p>%lstrc is the returned longstring.</p> | <p>%lstrc is the returned longstring.</p> | ||
===Syntax terms=== | |||
<table class="syntaxTable"> | |||
<tr><th>%lstr</th> | |||
<td>The longstring to be decompressed; it is required.</td></tr> | |||
<tr><th>option</th> | |||
<td>[Introduced in Model 204 version 8.0] | |||
<p>An optional string that controls the decompression method. The only valid option is:</p> | |||
<table class="syntaxTable"> | |||
<tr><th><var>SOFTWARE</var></th> | |||
<td>Forces the use of software decompression, bypassing the DFLTCC hardware instruction even when it is available on the processor (IBM z15 and above). This can be useful for diagnostic purposes or when byte-for-byte reproducibility with pre-8.0 behavior is required.</td></tr> | |||
</table> | |||
<p>If the option is omitted, hardware decompression is used automatically when DFLTCC is available, falling back to software decompression on older processors.</p> | |||
</td></tr> | |||
</table> | |||
==Usage notes== | ==Usage notes== | ||
<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. | ||
<li> 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. | <li> 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. | ||
<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> | ||
| Line 26: | Line 44: | ||
<p class="code"> %LSTRC = $Deflate('How much wood could a woodchuck chuck', 'FIXED') | <p class="code"> %LSTRC = $Deflate('How much wood could a woodchuck chuck', 'FIXED') | ||
%LSTR = $Inflate(%LSTRC) | %LSTR = $Inflate(%LSTRC) | ||
</p> | |||
The following example forces software decompression: | |||
<p class="code"> %LSTR = $Inflate(%LSTRC, 'SOFTWARE') | |||
</p> | </p> | ||
==Products authorizing $Inflate== | ==Products authorizing $Inflate== | ||
==Products authorizing {{PAGENAMEE}}== | |||
<li>[[Sirius functions]]</li> | <ul class="smallAndTightList"> | ||
<li>[[List of $functions|Sirius functions]]</li> | |||
<li>[[Fast/Unload User Language Interface]]</li> | <li>[[Fast/Unload User Language Interface]]</li> | ||
<li>[[Janus Open Client]]</li> | <li>[[Media:JoclrNew.pdf|Janus Open Client]]</li> | ||
<li>[[Janus Open Server]]</li> | <li>[[Media:JosrvrNew.pdf|Janus Open Server]]</li> | ||
<li>[[Janus Sockets]]</li> | <li>[[Janus Sockets]]</li> | ||
<li>[[Janus Web Server]]</li> | <li>[[Janus Web Server]]</li> | ||
<li> | <li>Japanese functions</li> | ||
<li>[[Sir2000 Field Migration Facility]]</li> | <li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li> | ||
</ul> | </ul> | ||
[[Category:$Functions|$Inflate]] | [[Category:$Functions|$Inflate]] | ||
Latest revision as of 13:19, 19 May 2026
Decompress a longstring with inflate
Note: Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Inflate function is the Inflate 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 or two arguments and returns a longstring result. The first argument is the longstring to be decompressed, and it is required.
Syntax
%lstrc = $Inflate(%lstr, [option])
%lstrc is the returned longstring.
Syntax terms
| %lstr | The longstring to be decompressed; it is required. | ||
|---|---|---|---|
| option | [Introduced in Model 204 version 8.0]
An optional string that controls the decompression method. The only valid option is:
If the option is omitted, hardware decompression is used automatically when DFLTCC is available, falling back to software decompression on older processors. |
Usage notes
- 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 .
Examples
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)
The following example forces software decompression:
%LSTR = $Inflate(%LSTRC, 'SOFTWARE')