Back to product page

Compression property

Determines if data is (de)compressed during encryption/decryption.


A CryptoCompression enumeration. Type of compression to use


  • Basic
object.Compression [= value]
The Compression(object,value) syntax has these parts:
objectAn expression evaluating to an object of type wodCrypt.
valueA CryptoCompression enumeration, as described in settings.


Constant Value Description
NoCompression 0 No compression is used.
ZlibCompression 1 Data compressed using ZLIB deflate.
GZipCompression 2 Data compressed using GZIP.

The Compression property determines if wodCrypt will compress data prior to encryption, and if it will decompress data after decryption process. You can decide to use one of two popular compression algorithms: ZLIB and GZIP. If you set this property when you encrypt the data, you should make same setting when you decrypt the data (wodCrypt does not internally store information if data is compressed or not)

You can also use wodCrypt just for compression. For example, you can set wodCrypt.Type = None (thus not applying any encryption method to it) and call Encrypt method - data would be just copied to outgoing Blob. If you enable compression when doing this - you will get compressed blob. Same applies for decompression.

Data is always compressed prior to encryption - trying to compress data after encryption wouldn't give any significant size reduction.