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

Unable to unzip large files #21

Open
jwollbrett opened this issue Feb 6, 2018 · 3 comments
Open

Unable to unzip large files #21

jwollbrett opened this issue Feb 6, 2018 · 3 comments

Comments

@jwollbrett
Copy link
Collaborator

the unzip R function is used to unzip files.
I found this information in the documentation of the function :

The default internal method is a minimal implementation, principally designed for Windows' users to be able to unpack Windows binary packages without external software. It does not (for example) support Unicode filenames as introduced in zip 3.0: for that use unzip = "unzip" with unzip 6.00 or later. It does have some support for bzip2 compression and > 2GB zip files (but not >= 4GB files pre-compression contained in a zip file: like many builds of unzip it may truncate these, in R's case with a warning if possible).

Then it is not possible to use this function for large files (undependently of the Operating System).

@jwollbrett
Copy link
Collaborator Author

jwollbrett commented Feb 6, 2018

I didn't find R package allowing to unzip large zip files.
It could be possible to use the following code for Unix and MacOs

sysinf <- Sys.info()['sysname'] if(sysinf == "Darwin" || sysinf == "Linux"){ system2("unzip", args = c("-o", file), stdout = TRUE) }

link to stackoverflow

I do not know if unzip is known by default in Windows.....
What should we use for Windows users?

@jwollbrett
Copy link
Collaborator Author

R.utils::decompressFile could be used to decompress .bz2 or .gz files

@fbastian
Copy link
Member

fbastian commented Feb 6, 2018

On any platform? Let's compress our files in gz then.

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

No branches or pull requests

2 participants