Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve performance of deflate Z_FULL_FLUSH
When using deflate Z_FULL_FLUSH all output data is flushed out on a byte boundary. The dictionary is discarded, such that the next blocks can be decoded without upfront history. We missed to set the DDCB flag preventing the dictionary to be transfered up again. This caused situations where we wanted to encode e.g. 32 KiB data using Z_FULL_FLUSH, and transfered output data and addionally 32 KiB dictionary data, which got immediately discarded. A potential problem might occur if not all output bytes can be written. In this case we still need the dictionary. So it is best to provide a large enough output buffer to avoid that situations.
- Loading branch information