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

Allow compressed data in R data files #308

Merged
merged 1 commit into from
Mar 7, 2021
Merged

Allow compressed data in R data files #308

merged 1 commit into from
Mar 7, 2021

Conversation

timholy
Copy link
Member

@timholy timholy commented Mar 7, 2021

Fixes #225
Fixes #32
xref JuliaStats/RDatasets.jl#117

For those interested in the details: the 1.5.x-and-earlier version of FileIO checked hasmagic on the format, and if it was a recognized extension without "magic" then it blindly trusted the format. The rewrite does the same. However, it turns out that previously hasmagic returned false if the format had a detection function rather than a set of magic bytes, whereas in my "cleaned up" implementation I only return false if magic is literally empty. Hence the old version checked when the format was identifed via a list of bytes but not when it was detected by a registered detection function.

For the record, I think the old approach wasn't really correct: if you've registered a detection function, that should be the same as registering explicit bytes. But it's just another piece of havoc created by the rewrite which in retrospect clearly should have been FileIO 2. 😢

@codecov
Copy link

codecov bot commented Mar 7, 2021

Codecov Report

Merging #308 (8049073) into master (3db3315) will decrease coverage by 0.19%.
The diff coverage is 96.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #308      +/-   ##
==========================================
- Coverage   89.59%   89.40%   -0.20%     
==========================================
  Files          10       10              
  Lines         596      623      +27     
==========================================
+ Hits          534      557      +23     
- Misses         62       66       +4     
Impacted Files Coverage Δ
src/registry.jl 87.75% <96.55%> (+1.92%) ⬆️
src/deprecated.jl 52.17% <0.00%> (-6.53%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3db3315...8049073. Read the comment docs.

@timholy timholy merged commit 295f057 into master Mar 7, 2021
@timholy timholy deleted the teh/compressed branch March 7, 2021 09:26
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.

Support for gz-compressed RData files Should we treat compressed files differently?
1 participant