$Inflate: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
Line 9: Line 9:


==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" />%lstrC = $Inflate(%lstr, option)
<p class="syntax"><section begin="syntax" />%lstrc = $Inflate(%lstr, option)
<section end="syntax" /></p>
<section end="syntax" /></p>
<p class="caption">$Inflate Function
<p class="caption">$Inflate Function
</p>
</p>
<p class="caption">%LSTRC is the returned longstring.</p>
<p class="caption">%lstrc is the returned longstring.</p>





Revision as of 22:36, 24 October 2012

Decompress a longstring with inflate

Most Sirius $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 argument and returns a longstring result. The argument is the longstring to be decompressed, and it is required.

Syntax

<section begin="syntax" />%lstrc = $Inflate(%lstr, option) <section end="syntax" />

$Inflate Function

%lstrc is the returned longstring.


Usage

  • 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)

Products authorizing $Inflate