LassoScript Utility
Basics Browse Detail

[Compress]

Tag Link [Compress] Category Technical
Type Substitution Source Available No
Support Preferred Version 5.0
Change Unchanged Data Source Any
Output Type String Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0

Description

[Compress] compresses a string using the zlib compression algorithm. This tag can be used to compress data for more efficient transmission or to preserve space in a database.

Note: The compression algorithm is only efficient on large amounts of data. For short strings of less than 256 characters the compressed value may actually be longer than the uncompressed string.

Syntax

[Compress: 'Compression Value']

Parameters

Required Parameters
Compression Value The value which is to be compressed.

Examples

To compress a string:

Use the [Compress] tag. The following example compresses a string and returns the results. The value is passed through [Encode_URL] for example purposes to ensure that the binary data can be displayed.

[Encode_URL: (Compress: 'The quick brown fox jumped over the lazy dog.')]

%00%00%00-x%9C%0B%C9HU(,%CDL%CEVH*%CA/%
CFSH%CB%AFP%C8*%CD-HMQ%C8/K-R(%01%CA%E
7%24VU*%A4%E4%A7%EB%01%00%7B%F1%10%5E