Description
-
Determines if data is (de)compressed during
encryption/decryption.
Property type
-
A CryptoCompression
enumeration. Type of compression to use
Syntax
-
object.Compression [= value]
The Compression Property syntax has these parts:
| object |
An expression
evaluating to an object of type wodCrypt. |
| value |
A
CryptoCompression
enumeration, as described in settings. |
Settings
-
The settings for value are:
 |
NoCompression |
0 |
No compression is used. |
 |
ZlibCompression |
1 |
Data compressed using ZLIB deflate. |
 |
GZipCompression |
2 |
Data compressed using GZIP. |
Remarks
-
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.