zlib 中 deflate() 或 inflate() 的 minimum/maximum 输入大小是多少?

What is the minimum/maximum input size for deflate() or inflate() in zlib?

当使用 zlib 时,可以处理 deflate()inflate() 的最小和最大输入缓冲区大小是多少?

最小缓冲区大小为 0。关于最大大小,请参阅 zlib FAQ:

Can zlib work with greater than 4 GB of data?

Yes. inflate() and deflate() will process any amount of data correctly. Each call of inflate() or deflate() is limited to input and output chunks of the maximum value that can be stored in the compiler's "unsigned int" type, but there is no limit to the number of chunks. Note however that the strm.total_in and strm_total_out counters may be limited to 4 GB. These counters are provided as a convenience and are not used internally by inflate() or deflate(). The application can easily set up its own counters updated after each call of inflate() or deflate() to count beyond 4 GB.