$GunZip: Difference between revisions

From m204wiki
Jump to navigation Jump to search
Created page with "{{DISPLAYTITLE:$GunZip}} <span class="pageSubtitle"><section begin="desc" />Decompress a longstring with GUNZIP<section end="desc" /></span> <p class="warning">Most Sirius $func..."
 
Tom (talk | contribs)
No edit summary
 
(34 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:$GunZip}}
{{DISPLAYTITLE:$GunZip}}
<span class="pageSubtitle"><section begin="desc" />Decompress a longstring with GUNZIP<section end="desc" /></span>
<span class="pageSubtitle">Decompress a longstring with GUNZIP</span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $GunZip function is [[to be entered]].</p>
<p class="warn"><b>Note: </b>Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $GunZip function is <var>[[Gunzip (String function)|Gunzip]]</var>.</p>


This function extracts information from a GZIP-format longstring.


The $GunZip function accepts two or three arguments and returns a longstring result.


This function extracts information from a GZIP-format longstring.
The $GunZip function accepts two arguments and returns a longstring result.
==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" /> %lstrc = $GunZip(%lstr, type)
<p class="syntax"><span class="term">%lstrc</span> = <span class="literal">$GunZip</span>(%lstr, type, [<span class="term">option</span>])
<section end="syntax" /></p>
<p class="caption">$GunZip Function
</p>
</p>
<p class="caption">%lstrc is the returned longstring.</p>
<p>
</p>
<p>%lstrc is the returned longstring.</p>


The first argument, the longstring to be decompressed, is required. The string must be in GZIP format.


The first argument, the longstring to be decompressed, is required. The string must be in GZIP format.  
The second argument is a string indicating what information should be extracted from the GZIP-format longstring. This argument is optional; if it is not specified, <tt>DATA</tt> is assumed, and the longstring is decompressed into the result longstring. Valid options and their meanings are:
 
===Options===


The second argument is a string indicating what information should be extracted from the GZIP-format longstring. This argument is optional; if it is not specified, <tt>DATA</tt> is assumed, and the longstring is decompressed into the result longstring. Valid options and their meanings are:
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>DATA</th>
<tr><th>DATA</th>
<td>Indicates that the data in the GZIP longstring is extracted. This is the default.</td></tr>
<td>Indicates that the data in the GZIP longstring is extracted. This is the default.</td></tr>
<tr><th>TIME</th>
<tr><th>TIME</th>
<td>Indicates that the date and time, known as the "modification time," is returned (in the form <tt>YYYY-MM-DD HH:MI:SS:elit.).</td></tr>
<td>Indicates that the date and time, known as the "modification time," is returned (in the form <tt>YYYY-MM-DD HH:MI:SS</tt>).</td></tr>
<tr><th>NAME</th>
<tr><th>NAME</th>
<td>Indicates that the internal name of the GZIP entity is returned in the result. If no internal name is present, the null string is returned.
<td>Indicates that the internal name of the GZIP entity is returned in the result. If no internal name is present, the null string is returned.
</td></tr></table>
</td></tr>
Usage notes:
</table>
 
The third argument is an optional string that controls the decompression method. [Introduced in Model 204 version 8.0]
 
<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 third argument is omitted, hardware decompression is used automatically when DFLTCC is available, falling back to software decompression on older processors.</p>
 
==Usage notes==
 
<ul>
<ul>
 
<li> If an invalid option is passed, or if compression is not enabled for the current run, the request is cancelled.
<li> If an invalid option is passed, or 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 $GZip function can be used. If $GunZip is called with NCMPBUF = 0, the request is cancelled.
<li> The NCMPBUF parameter must be set by User 0 before the $GZip function can be used. If $GunZip is called with NCMPBUF = 0, the request is cancelled.
</ul>
</ul>


==Examples==


In the following example,
<tt>%ls</tt> is set to the uncompressed version of the given string The <tt>DATA</tt> value default is implied, since no second argument is given.


In the following example,
<li>.%ls</tt> is set to the uncompressed version of the given string The <tt>DATA</tt> value default is implied, since no second argument is given.
<p class="code"> %ls = $GunZip(%lsgz)
<p class="code"> %ls = $GunZip(%lsgz)
</p>
</p>


In the following example,


<tt>%dt</tt> is set to the last modification date and time of the file contained in the GZIP longstring.
<p class="code"> %dt = $GunZip(%lsgz, 'TIME')
</p>


In the following example,
The following example forces software decompression:
<li>.%dt</tt> is set to the last modification date and time of the file contained in the GZIP longstring.
<p class="code"> %ls = $GunZip(%lsgz, 'DATA', 'SOFTWARE')
<p class="code"> %dt = $GunZip(%lsgz, 'TIME')
</p>
</p>
<blockquote> GZIP-format files can be created with the function $GZip , as well as other file compression utilities. :enote
 
''Note: GZIP-format files can be created with the function [[$GZip]] as well as other file compression utilities.''
 
==Products authorizing {{PAGENAMEE}}==
<ul class="smallAndTightList">
<ul class="smallAndTightList">
<li>[[Sirius functions]]</li>
<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>[[Japanese functions]]</li>
<li>Japanese functions</li>
<li>[[Sir2000 Field Migration Facility]]</li>
<li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li>


</ul>
</ul>
<p class="caption">Products authorizing $GunZip
<p>
</p>
</p>


[[Category:$Functions|$GunZip]]
[[Category:$Functions|$GunZip]]

Latest revision as of 13:55, 19 May 2026

Decompress a longstring with GUNZIP

Note: Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $GunZip function is Gunzip.

This function extracts information from a GZIP-format longstring.

The $GunZip function accepts two or three arguments and returns a longstring result.

Syntax

%lstrc = $GunZip(%lstr, type, [option])

%lstrc is the returned longstring.

The first argument, the longstring to be decompressed, is required. The string must be in GZIP format.

The second argument is a string indicating what information should be extracted from the GZIP-format longstring. This argument is optional; if it is not specified, DATA is assumed, and the longstring is decompressed into the result longstring. Valid options and their meanings are:

Options

DATA Indicates that the data in the GZIP longstring is extracted. This is the default.
TIME Indicates that the date and time, known as the "modification time," is returned (in the form YYYY-MM-DD HH:MI:SS).
NAME Indicates that the internal name of the GZIP entity is returned in the result. If no internal name is present, the null string is returned.

The third argument is an optional string that controls the decompression method. [Introduced in Model 204 version 8.0]

SOFTWARE 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.

If the third argument is omitted, hardware decompression is used automatically when DFLTCC is available, falling back to software decompression on older processors.

Usage notes

  • If an invalid option is passed, or if compression is not enabled for the current run, the request is cancelled.
  • The NCMPBUF parameter must be set by User 0 before the $GZip function can be used. If $GunZip is called with NCMPBUF = 0, the request is cancelled.

Examples

In the following example, %ls is set to the uncompressed version of the given string The DATA value default is implied, since no second argument is given.

%ls = $GunZip(%lsgz)

In the following example,

%dt is set to the last modification date and time of the file contained in the GZIP longstring.

%dt = $GunZip(%lsgz, 'TIME')

The following example forces software decompression:

%ls = $GunZip(%lsgz, 'DATA', 'SOFTWARE')

Note: GZIP-format files can be created with the function $GZip as well as other file compression utilities.

Products authorizing $GunZip