Gunzip (String function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
JAL2 (talk | contribs)
Tom (talk | contribs)
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:String:Gunzip subtitle}}
{{Template:String:Gunzip subtitle}}
This function extracts information from a GZIP-format longstring.


This function extracts information from a GZIP-format longstring.
==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>


==Syntax==
Throws [[InvalidGZipData class|InvalidGZipData]]</p>
{{Template:String:Gunzip syntax}}


===Syntax terms===
===Syntax terms===
Line 12: Line 13:


<tr><th>string</th>
<tr><th>string</th>
<td>A string which has been assigned the output of a <var>[[Gunzip (String function)|Gunzip]]</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 <var>[[NCMPBUF parameter|NCMPBUF]]</var> parameter must be set to a
<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.
non-0 value during <var class="product">Model 204</var>initialization to allow
use of the <var>Gunzip</var> function; otherise, invoking <var>Gunzip</var>
causes request cancellation.
</ul>
</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==
==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:  
<li>Other related methods:
<ul>
<ul>
<li><var>[[GunzipDatetimeNS (String function)|GunzipDatetimeNS]]</var>
<li><var>[[GunzipDatetimeNS (String function)|GunzipDatetimeNS]]</var>

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