-
Notifications
You must be signed in to change notification settings - Fork 127
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
Fall back on gzip
if pigz
fails
#476
Comments
If we're only using pigz as a fallback for the trailing data case and prefer python standard library gzip otherwise, I think it makes more sense to implement a fix in python ourselves, it's a pretty simple modification to the standard library package. (see this stackoverflow answer: https://stackoverflow.com/questions/4928560/how-can-i-work-with-gzip-files-which-contain-extra-data) there isn't any sort of official Windows packaging for |
Like the idea of removing dependencies if we can. If your solution passes all the tests (including https://github.com/redballoonsecurity/ofrak/blob/master/ofrak_core/test_ofrak/components/test_gzip_component.py#L38, then it should work). Would also make sense to update our testing code to use python std. library to set up/validate zip files for testing. |
One issue not taken into account in #472, when we switched the default GZIP unpacker to the Python standard library instead of If, in fact, we can reliably use Python standard library
|
Can be closed after #485 merged. Should have written "Fixes" in that PR 🤦 |
Recent PR #472 uses Python's built-in
gzip
module for decompressing GZIP data if possible, and falls back on the system version ofpigz
if the Python version fails.Inside of OFRAK Docker images, we can be confident that
pigz
is present. But when a user installs OFRAK viapip install
, they may not havepigz
on their system. They are, however, likely to havegzip
on their system. As such, we should fall back from Pythongzip
topigz
togzip
to increase the likelihood that something will work for GZIP decompression.Implementing this may involve modifying
ComponentExternalTool
(see this comment on #472). This may have implications for other OFRAK functionality usingComponentExternalTool
.The text was updated successfully, but these errors were encountered: