![]() |
Encr_Compress |
Compresses text using a ZLIB algorithm.
Syntax
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ƒd Wÿ”
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 functions
Encr_Decompress |
Encr_EncodeSafeAscii |
Related topics
Troi Encryptor Plug-in online help (overview)