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

fread could attempt auto-unzip #3834

Closed
MichaelChirico opened this issue Sep 7, 2019 · 0 comments · Fixed by #5240
Closed

fread could attempt auto-unzip #3834

MichaelChirico opened this issue Sep 7, 2019 · 0 comments · Fixed by #5240
Assignees
Labels
Milestone

Comments

@MichaelChirico
Copy link
Member

Spurred by: https://stackoverflow.com/q/57829746/3576984

Wikipedia gives zip file signatures: https://en.wikipedia.org/wiki/List_of_file_signatures

And indeed the file in that SO Q has the zip signature:

readBin('household_power_consumption.zip', raw(), 4L)
# [1] 50 4b 03 04

Since unzip is standard (utils) functionality, it seems reasonable we could auto-unzip files for convenience.

Error if nrow(unzip(f, list=TRUE)) > 1L) for now, but maybe more advanced once #586 and/or #2582 are done.

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

Successfully merging a pull request may close this issue.

4 participants