R.utils icon indicating copy to clipboard operation
R.utils copied to clipboard

XZip Functionality?

Open muschellij2 opened this issue 4 years ago • 2 comments

Issue: xzip decompression and compression. I was going to send a PR, but it looks like this was thought of and discarded: https://github.com/HenrikBengtsson/R.utils/blob/develop/R/compressFile.R#L19. I guess the question is whether to do a PR or the rationale by not including?

muschellij2 avatar Feb 29 '20 20:02 muschellij2

Thanks for bringing this up. I forgot about it. If you look further down in the code you find:

https://github.com/HenrikBengtsson/R.utils/blob/95aad996e0fff0aca3ccc7f10b0248d69a8f1877/R/compressFile.R#L328-L330

I'm happy to add support for 'xz' if we can confirm that things work properly on Windows as well. If it doesn't, then it would be useful to understand a bit more why it doesn't and document the limitation in the help page. If it doesn't work properly on Windows, an alternative is to test for Windows and give an informative error message.

HenrikBengtsson avatar Feb 29 '20 20:02 HenrikBengtsson

I just tried and it turns out this still produces an error (see https://travis-ci.org/github/HenrikBengtsson/R.utils/jobs/667557219#L921).

It could be that my strategy for compressing/decompressing by using xzfile() is based on incorrect assumption. Feel free to investigate further.

HenrikBengtsson avatar Mar 27 '20 04:03 HenrikBengtsson