Inflate (String function): Difference between revisions
Jump to navigation
Jump to search
m (→See also) |
m (→Usage notes) |
||
Line 20: | Line 20: | ||
<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- | non-zero value during <var class="product">Model 204</var>initialization to allow | ||
use of the <var>Inflate</var> function; otherise, invoking <var>Inflate</var> | use of the <var>Inflate</var> function; otherise, invoking <var>Inflate</var> | ||
causes request cancellation. | causes request cancellation. | ||
</ul> | </ul> | ||
==Examples== | ==Examples== | ||
In the following example, <code>%out</code> is set to the original string (<code>How much</code>..<code>chuck</code>): | In the following example, <code>%out</code> is set to the original string (<code>How much</code>..<code>chuck</code>): |
Revision as of 18:06, 9 August 2012
Decompress a longstring with inflate (String class)
[Introduced in Sirius Mods 7.4]
This function takes a result from Deflate (a compressed string) and decompresses it using the "inflate" algorithm. The inflate algorithm is described as part of the deflate specification in RFC 1951.
Syntax
%outString = string:Inflate Throws InvalidDeflateData
Syntax terms
%outString | The result decompressed string. |
---|---|
string | The compressed string to be decompressed. |
Exceptions
Inflate can throw the following exception:
- InvalidDeflateData
- This exception indicates that the method object string does not contain a valid Deflate string compression output.
Usage notes
- The NCMPBUF parameter must be set to a non-zero value during Model 204initialization to allow use of the Inflate function; otherise, invoking Inflate causes request cancellation.
Examples
In the following example, %out
is set to the original string (How much
..chuck
):
%temp = 'How much wood could a woodchuck chuck':deflate(fixedCode=true) %out = %temp:Inflate
See also
- Deflate is used to compress a string using the "deflate" algorithm.
- Other related methods: