Encr_Compress (function reference)

By August 1, 2017 September 26th, 2017 Online Help, Troi Encryptor Plug-in
Troi Encryptor Plug-in for FileMaker Pro

Encr_Compress

Compresses text using a ZLIB algorithm.

SyntaxFunction badge

Encr_Compress ( switches ; text )

Parameters

switchesreserved for future use, leave empty or set to "-Unused"
textthe text to compress

Returned Result

Data type returned

Text

Result

the compressed text string.

Originated in

Troi Encryptor Plug-in 1.2

Compatibility

FileMaker Pro 12 to 16

Considerations

NOTE 1: short strings (less than 20 characters) of text might be longer after compression.
NOTE 2: the compression result can contain all ASCII codes (0-255). See “Encr_EncodeSafeAscii” for conversion to safe ASCII codes.

Example

Set Field [ result ; Encr_Compress ( "-Unused" ; "123456789 123456789 123456789" ) ]

will result in the compressed string: “xú3426153∑∞T0ƒdWÿ”

Example 2

In a document database you have defined a text field named “letterContents” which contains the main part of a letter. Then you can define a calculation field:

LetterCompressCalc   calculation     = Encr_Compress ( "-Unused" ;  LetterContents ) ]

this field will contain the compressed version of the field.

Related functionsFunction badge

Encr_Decompress
Encr_EncodeSafeAscii

Related topics

Troi Encryptor Plug-in online help (overview)


Online Help Page for Troi Encryptor Plug-in for 12 to 16 –> Encr_Compress (encrp4231) 2017-0814 18:08:14