Gunzip (String function): Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
| (12 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
{{Template:String:Gunzip subtitle}} | {{Template:String:Gunzip subtitle}} | ||
This function extracts information from a GZIP-format longstring. | |||
==Syntax== | ==Syntax== | ||
<p class="syntax"><span class="term">%outString</span><span class="literal"> =</span> <span class="term">string</span><span class="literal">:Gunzip</span><span class="squareb">[</span><span class="literal">(</span> <span class="squareb">[</span><span class="literal" title="Boolean">Software=</span> <span class="term" title="Boolean">boolean</span><span class="squareb">]</span><span class="literal">)</span><span class="squareb">]</span> | |||
Throws [[InvalidGZipData class|InvalidGZipData]]</p> | |||
===Syntax terms=== | ===Syntax terms=== | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>%outString</th><td>The decompressed content of the | <tr><th>%outString</th> | ||
<td>The decompressed content of the <var class="term">string</var> method object.</td></tr> | |||
<tr><th>string</th> | <tr><th>string</th> | ||
<td>A string which has been assigned the output of a <var>[[Gzip (String function)|Gzip]]</var> invocation.</td></tr> | <td>A string which has been assigned the output of a <var>[[Gzip (String function)|Gzip]]</var> invocation.</td></tr> | ||
<tr><th><var>Software</var></th> | |||
<td>[Introduced in Model 204 version 8.0] | |||
<p><var>Software</var> is an optional, [[Notation conventions for methods#Named parameters|name required]], parameter that is a <var>[[Boolean_enumeration#Using_Boolean_enumerations|Boolean]]</var> value that specifies whether to force the use of software decompression instead of hardware decompression.</p> | |||
<ul> | |||
<li>When <code>software=true</code>, decompression is always performed in software, even if the DFLTCC hardware instruction is available on the processor. This can be useful for diagnostic purposes or when byte-for-byte reproducibility with pre-8.0 behavior is required.</li> | |||
<li>When <code>software=false</code> (the default), hardware decompression is used automatically when DFLTCC is available (IBM z15 and above), falling back to software decompression on older processors.</li> | |||
</ul> | |||
The default value for this argument is <var>False</var>. | |||
</td></tr> | |||
</table> | </table> | ||
==Usage notes== | ==Usage notes== | ||
<ul> | |||
<li>The <var>[[NCMPBUF parameter|NCMPBUF]]</var> parameter must be set to a non-0 value during <var class="product">Model 204</var> initialization to allow use of the <var>Gunzip</var> function; otherwise, invoking <var>Gunzip</var> causes request cancellation. | |||
</ul> | |||
==Examples== | |||
The following example decompresses a GZIP-format string: | |||
<p class="code">%out = %compressed:Gunzip | |||
</p> | |||
The following example forces software decompression: | |||
<p class="code">%out = %compressed:Gunzip(software=true) | |||
</p> | |||
==See also== | |||
<ul> | <ul> | ||
<li>The inverse of <var>Gunzip</var> is <var>[[Gzip (String function)|Gzip]]</var>. | <li>The inverse of <var>Gunzip</var> is <var>[[Gzip (String function)|Gzip]]</var>. | ||
<li>Other related methods: | |||
<ul> | |||
<li><var>[[GunzipDatetimeNS (String function)|GunzipDatetimeNS]]</var> | |||
<li><var>[[GunzipFilename (String function)|GunzipFilename]]</var> | |||
<li><var>[[Zip (String function)|Zip]]</var> | |||
<li><var>[[Deflate (String function)|Deflate]]</var> | |||
<li><var>[[Inflate (String function)|Inflate]]</var> | |||
</ul> | |||
</ul> | </ul> | ||
{{Template:String:Gunzip footer}} | {{Template:String:Gunzip footer}} | ||
Latest revision as of 13:57, 19 May 2026
Decompress a longstring with GUNZIP (String class)
[Introduced in Sirius Mods 7.4]
This function extracts information from a GZIP-format longstring.
Syntax
%outString = string:Gunzip[( [Software= boolean])] Throws InvalidGZipData
Syntax terms
| %outString | The decompressed content of the string method object. |
|---|---|
| string | A string which has been assigned the output of a Gzip invocation. |
| Software | [Introduced in Model 204 version 8.0]
Software is an optional, name required, parameter that is a Boolean value that specifies whether to force the use of software decompression instead of hardware decompression.
The default value for this argument is False. |
Usage notes
- The NCMPBUF parameter must be set to a non-0 value during Model 204 initialization to allow use of the Gunzip function; otherwise, invoking Gunzip causes request cancellation.
Examples
The following example decompresses a GZIP-format string:
%out = %compressed:Gunzip
The following example forces software decompression:
%out = %compressed:Gunzip(software=true)
See also
- The inverse of Gunzip is Gzip.
- Other related methods: