image-rs/deflate-rs

Implement further ZLIB flush modes.

oyvindln opened this issue · 2 comments

Using flush on the writer currently ends the compression stream and writes a trailer (without resetting the encoder.) The writers in flate2 calls miniz/zlib with SYNC_FLUSH, which outputs the current pending data and adds an empty block at the end. This is probably the behaviour we should emulate.

Sync flush has been implemented, but I'll leave the issue open for now.

May want to add support for other methods and an explicit writer method to flush.