Gunzip (String function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
Dme (talk | contribs)
Tom (talk | contribs)
No edit summary
 
(13 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==
{{Template:String:Gunzip 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 method object <var class="term">string</var>.</td></tr>
<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</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>
<ul>
<li>The inverse of <var>Gunzip</var> is <var>[[Gzip (String function)|Gzip]]</var>.
<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>
</ul>


==Examples==
==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==
==See also==
<ul>
<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>
{{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.

  • When software=true, 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.
  • When software=false (the default), hardware decompression is used automatically when DFLTCC is available (IBM z15 and above), falling back to software decompression on older processors.

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