Inflate (String function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
Line 1: Line 1:
{{Template:String:Inflate subtitle}}
{{Template:String:Inflate subtitle}}
 
This page is [[under construction]].
This function takes a result from <var>[[Deflate (String function)|Deflate]]</var> (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==
==Syntax==
{{Template:String:Inflate syntax}}
{{Template:String:Inflate syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%outString</th><td>string</td></tr>
<tr><th>%outString</th><td>The result decompressed string.</td></tr>
<tr><th>string</th>
<tr><th>string</th>
<td>string</td></tr>
<td>The compressed string to be decompressed.</td></tr>
</table>
</table>
==Exceptions==
==Exceptions==
Line 14: Line 14:
<dl>
<dl>
<dt><var>[[InvalidDeflateData class|InvalidDeflateData]]</var>
<dt><var>[[InvalidDeflateData class|InvalidDeflateData]]</var>
<dd>This exception indicates that the method object string does not contain a valid <var>[[Deflate (String function)|Deflate]]</var> string compression output.
<dd>This exception indicates that the method object <var class="term">string</var> does not contain a valid <var>[[Deflate (String function)|Deflate]]</var> string compression output.
</dl>
</dl>
 
==Usage notes==
==Usage notes==
<ul>
<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>Inflate</var> function; otherise, invoking <var>Inflate</var>
causes request cancellation.
</ul>
==Examples==
==Examples==
In the following example, <code>%out</code> is set to the original string (<code>How much</code>..<code>chuck</code>):
<p class="code">%temp = 'How much wood could a woodchuck chuck':deflate(fixedCode=true)
%out = %temp:Inflate
</p>
==See also==
==See also==
<ul>
<li>[[??]]
</ul>
{{Template:String:Inflate footer}}
{{Template:String:Inflate footer}}

Revision as of 03:09, 1 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