gesistsa / rio

🐟 A Swiss-Army Knife for Data I/O
http://gesistsa.github.io/rio/
594 stars 77 forks source link

`find_compress()` incorrectly recognizes `gzip` as `zip` #395

Closed chainsawriot closed 2 months ago

chainsawriot commented 2 months ago

While solving #354

As an example:

rio::export(iris, tempfile(fileext = ".csv.gzip"))

gzip doesn't work, due to this

https://github.com/gesistsa/rio/blob/479a765a37b6cfad323778660121c8deaf0c874f/R/compression.R#L2

gzip is mistaken as zip.

chainsawriot commented 2 months ago

Actually, bzip2 and xz also don't work, but probably due to another issue.

chainsawriot commented 2 months ago
rio:::find_compress("file.gzip")$compress
#> [1] "zip"

Created on 2024-04-25 with reprex v2.1.0