flate2-rs icon indicating copy to clipboard operation
flate2-rs copied to clipboard

Add method to get current position for GzDecoder

Open alexnivanov opened this issue 2 years ago • 1 comments
trafficstars

Greetings!

It would be very nice to have a method to get the current position in compressed file: this way it's possible to calculate/display progress of file processing since we know the size of compressed file, not the uncompressed.

This is what gzoffset does in zlib C library.

alexnivanov avatar Nov 24 '22 14:11 alexnivanov

Wouldn't you also know the size of the uncompressed file if you added a "footer" function? That should have the CRC as well as the uncompressed size.

Edit: looks like that's only going to be the size modulo 2^32 ☹️

hut8 avatar Oct 10 '23 18:10 hut8