Skip to main content

Encr_Compress (function reference)

By April 20, 2023April 25th, 2023Online 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

switches reserved for future use, leave empty or set to "-Unused"
text the 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 16 to FileMaker Pro 2023

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.

Used in example file

Compress.fmp12

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 16 to 2023 –> Encr_Compress (encrp4231) 2023-0425 15:44:37