Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

total_in(&self) / total_out(&self) implementation for GzDecoder / GzEncoder / MultiGzDecoder #381

Open
fedy-cz opened this issue Oct 15, 2023 · 2 comments

Comments

@fedy-cz
Copy link

fedy-cz commented Oct 15, 2023

Hello

Is there a reason why total_in(&self) / total_out(&self) isn't implemented for Gzip decoders/encoders? It is present for both Zlib and Deflate and could be really useful for monitoring progress of the operation.

Looking at the decoder implementations, they seem to be using the same DeflateDecoder underneath - only wrapped in CrcReader<>. So it could be as simple as forwarding the function call in.

It could be also nice to separate these functions into a trait to provide a generic interface for libraries building on top of flate2.

@Byron
Copy link
Member

Byron commented Oct 15, 2023

Thanks for bringing this up!

Even though I don't have an answer, I wonder if that could be an oversight that could be remedied by adding these methods and wiring them up? Could that work as 'as simple as possible' solution? And possible, do we have tests that could be extended to use that new functionality?

@fedy-cz
Copy link
Author

fedy-cz commented Oct 15, 2023

Submited PR for this:
#382

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants