Inflate (String function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
Line 31: Line 31:
==See also==
==See also==
<ul>
<ul>
<li>[[??]]
<li><var>[[Deflate (String function)|Deflate]]</var> is used to compress a string using the "deflate" algorithm.
<li>Other related methods:
<ul>
<li><var>[[Gunzip (String function)|Gunzip]]</var>
<li><var>[[GunzipDatetimeNS (String function)|GunzipDatetimeNS]]</var>
<li><var>[[GunzipFilename (String function)|GunzipFilename]]</var>
<li><var>[[Gzip (String function)|Gzip]]</var>
</ul>
</ul>
</ul>
   
   
{{Template:String:Inflate footer}}
{{Template:String:Inflate footer}}

Revision as of 18:02, 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

%outStringThe 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-0 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