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

Gzip fixes #537

Merged
merged 3 commits into from
Jun 2, 2021
Merged

Gzip fixes #537

merged 3 commits into from
Jun 2, 2021

Conversation

kmohrman
Copy link
Contributor

@kmohrman kmohrman commented Jun 2, 2021

These updates would resolve Issue #534 by checking whether or not a file is a gz file before attempting to open it as a gz file. The recent PR by @lgray already resolves the issue with an adjustment of the filename-based approach, but I wanted to provide this PR as well because it checks the file content instead of relying on the file name.

Copy link
Member

@nsmith- nsmith- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this approach of checking the file magic bytes.

@lgray
Copy link
Collaborator

lgray commented Jun 2, 2021

Yep - much better than checking the file names, also makes it easy to add other compression formats later.

@lgray lgray merged commit 515877f into CoffeaTeam:master Jun 2, 2021
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

Successfully merging this pull request may close these issues.

Opening text files as .gz files
3 participants