Closed kingluo closed 2 years ago
All interfaces in this crate should work for your purposes. If you want really low-level support there's the Compress
type as well.
How to use gzip and deflate respectively via Compress
?
Internally Compress
is used by all the I/O types.
Given that I need to compress a huge file for HTTP download, then I need to compress each chunk of the file and send chunk by chunk via HTTP response. But this crate does not export API to access intermedia compression results, it just collects the output of each chunk and only finish() returns the final result. But how about OOM? In fact, the zlib itself provides the interface to access the intermedia result.