Compressing data before encryption not only makes for shorter messages to be transmitted or stored, but also improves security by reducing the redundancy in the plaintext and making cryptanalysis harder.
CryptoSys API includes compression (ZLIB_Deflate
)
and decompression (ZLIB_Inflate
)
functions based on Jean-loup Gailly's excellent zlib product.
Just remember to compress before encrypting.