Gzip (String function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
Line 17: Line 17:
<td>string</td></tr>
<td>string</td></tr>
<tr><th><var>LastModified</var></th>
<tr><th><var>LastModified</var></th>
<td>The date/time stamp to be stored as a component of <var class="term">%outString</var>, expressed as a number of the form . The default is the current date and time.
<td>The date/time stamp to be stored as a component of <var class="term">%outString</var>, expressed as the number of milliseconds since 12:00 AM, Jan 1, 1900. The default is the current date and time (i.e., <var>[[CurrentTimeMilliseconds (System function)|%(System):CurrentTimeMilliseconds]]</var>.


After <var>Gzip</var> stores a value into <var class="term">%string</var>, the <var>LastModified</var> date/time stamp  can be obtained with the <var>[[GunzipDatetimeNS (String function)|GunzipDatetimeNS]]</var> function.
After <var>Gzip</var> stores a value into <var class="term">%string</var>, the <var>LastModified</var> date/time stamp  can be obtained with the <var>[[GunzipDatetimeNS (String function)|GunzipDatetimeNS]]</var> function, but note that its output is in seconds, not milliseconds.
</td></tr>
</td></tr>
</table>
</table>

Revision as of 21:08, 8 February 2012

Compress a longstring with GZIP (String class)

[Introduced in Sirius Mods 7.4]


Syntax

%outString = string:Gzip[( [FixedCode= boolean], [LazyMatch= boolean], - [MaxChain= number], [Filename= string], - [LastModified= number])]

Syntax terms

%outStringThe result of the GZIP operation, compressing the method object string.
string The string to be compressed by the GZIP operation.
FixedCode Boolean value
LazyMatch Boolean value
MaxChain number
Filename string
LastModified The date/time stamp to be stored as a component of %outString, expressed as the number of milliseconds since 12:00 AM, Jan 1, 1900. The default is the current date and time (i.e., %(System):CurrentTimeMilliseconds.

After Gzip stores a value into %string, the LastModified date/time stamp can be obtained with the GunzipDatetimeNS function, but note that its output is in seconds, not milliseconds.

Usage notes

  • The inverse of Gzip is Gunzip.

Examples

See also