Contents - Index - Previous - Next


EncryptBeforeCompress property

 

Applies to

TVCLUnZip component

 

Declaration

property EncryptBeforeCompress: Boolean;

 

Description

Set this property to True if you want VCLZip to perform encryption on data BEFORE compressing it. The normal pkzip process is to compress the data and then encrypt it.  This will perform encryption directly on the original data

.  

However, this feature is not that useful, because encryption actually renders the data un-compressable because it randomizes the data. Often, small un-compressable files will be STORE'd insteand of DEFLATED in the archive. Since, in this case, there is no compression, EncryptBeforeCompression is irrelevant. Therefore, this property is most useful when used with your own encryption technique (see OnEncrypt and OnDecrypt above) as long as it does not randomize the data too much. 

 

Note that if you create a zip file with encrypted files while this is set to True, the property must also be set to True when decompressing the same data.  

 

See Also: 

 

OnEncrypt 

OnDecrypt 

Password

 

Run-time only