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

Add libdeflate gunzip logic to handle gzipped files which decompress to files larger than 4G or which contain multiple concatenated gzip files. #8

Open
ghuls opened this issue Jun 23, 2021 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ghuls
Copy link

ghuls commented Jun 23, 2021

Add libdeflate gunzip logic to handle gzipped files which decompress to files larger than 4G or which contain multiple concatenated gzip files.

Some gzip files have 0 for the decompressed gzip length or contain multiple gzip files concatenated together so the size hint is only for the last gzip "file" instead of for the whole file.

https://github.com/ebiggers/libdeflate/blob/master/programs/gzip.c#L206-L273

@dcwatson
Copy link
Owner

I'm not sure what this would look like in the Python API. My goal was to make this a drop-in replacement for https://docs.python.org/3/library/gzip.html#gzip.decompress - it sounds like you want something that would return a list (or preferably a generator) of decompressed data chunks. I'm not totally opposed to adding something like that if you have a working implementation, but probably won't look into it myself.

@dcwatson dcwatson added enhancement New feature or request help wanted Extra attention is needed labels Dec 1, 2023
@dcwatson
Copy link
Owner

Also I should note, supporting large files is explicitly not a goal of libdeflate itself, so it won't be for this wrapper either. But if someone wants to work on handling small concatenated gzip files, I'd be curious to see what that looks like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants