Open karlwessel opened 3 years ago
@karlwessel I can reproduce this, but the whole stacktrace is referring to FileIO, so I think that might be the best place to address this. Also, from the README:
NOTE: If you are starting a new project on Julia 0.6 or later, it is recommended to use the CodecZlib.jl package instead. CodecZlib.jl and other packages offer more unified interfaces for a wide range of file formats.
As an example,
julia> using CodecZlib
julia> stream = GzipDecompressorStream(open("test.log.gz"))
TranscodingStreams.TranscodingStream{GzipDecompressor, IOStream}(<mode=idle>)
julia> for line in eachline(stream)
println(line)
end
┌ Warning: this is a test
│ x = 3
└ @ Main REPL[22]:2
Probably we should replace the entry for Libz.jl in FileIO. I've opened an issue to that effect: https://github.com/JuliaIO/FileIO.jl/issues/316
@jakobnissen We should probably add this package to the list of packages for deprecation / archiving
Thanks for the quick verification.
I don't know how important the FileIO integration for gzipped files actually is. In my case, because of https://github.com/JuliaIO/FileIO.jl/issues/32, I thought FileIO could automatically handle compressed FITS files by first uncompressing them with Libz and then forwarding to the FITSIO loader. But I think I misread that issue and that behaviour isn't implemented yet anyway.
So not quite sure what the usecase for compression algorithms with FileIO really is, it is seldom that you want to "load" a compressed file.
Not to say that I don't think that the above behaviour should be fixed, either by implementing the loading correctly or by removing the registry entry, just that it is not such a pressing matter.
Fair enough, worth correcting the reference, in any case. I don't use FileIO myself, so I'm not the best judge of usefulness.
xref #69.
Expected Behavior
Since GZipped files are registered in
FileIO
to be opened with this library I would expector at least the streaming version
to work by giving me some unzipped file handle or a stream.
Current Behavior
However both give me an error. For
load(...)
it isfor
loadstreaming(...)
it isPossible Solution / Implementation
I skipped over the source and it seems that
FileIO
is not among this packages dependencies and is also nowhere used? Are the implementations ofLibz.load
andLibz.loadstreaming
actually missing?Context
I am trying to load compressed FITS files using
FITSIO.jl
and this package. But the error happens with any Gzipped file.Your Environment
This is the
status
of my test environment: