Inflate (String function)

From m204wiki
Revision as of 13:18, 19 May 2026 by Tom (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 resulting decompressed string.
string The compressed string to be decompressed.
Software [Introduced in Model 204 version 8.0]

Software is an optional, name required, parameter that is a Boolean value that specifies whether to force the use of software decompression instead of hardware decompression.

  • When software=true, decompression is always performed in software, even if the DFLTCC hardware instruction is available on the processor. This can be useful for diagnostic purposes or when byte-for-byte reproducibility with pre-8.0 behavior is required.
  • When software=false (the default), hardware decompression is used automatically when DFLTCC is available (IBM z15 and above), falling back to software decompression on older processors.

The default value for this argument is False.

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 204 initialization to allow use of the Inflate function; otherwise, 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

The following example forces software decompression:

%out = %temp:Inflate(software=true)

See also