Module Cryptokit.Zlib
The Zlib module supports the compression and decompression of data, using the zlib library. The algorithm used is Lempel-Ziv compression as in the gzip and zip compressors. While compression itself is not encryption, it is often used prior to encryption to hide regularities in the plaintext, and reduce the size of the ciphertext.
val compress : ?level:int -> ?write_zlib_header:bool -> unit -> transformReturn a transform that compresses its input. The optional
levelargument is an integer between 1 and 9 specifying how hard the transform should try to compress data: 1 is lowest but fastest compression, while 9 is highest but slowest compression. The default level is 6. The optionalwrite_zlib_headerargument dictates whether the output should be wrapped within a zlib header and checksum. The default is false.
val uncompress : ?expect_zlib_header:bool -> unit -> transformReturn a transform that decompresses its input. The optional
expect_zlib_headerargument dictates whether the input is wrapped within a zlib header and checksum. The default is false.