I have tried many libraries, but it seems that I cannot get the types to match.
Typical attempt:
using SomeLib, CSV
fh = SomeLib.open("gzipped_file.gz")
CSV.read(fh) # error
Example:
using CodecZlib
CSV.read(GzipDecompressorStream(open("gzipped_file.gz")))
# ERROR: MethodError: no method matching position(::TranscodingStreams.TranscodingStream{GzipDecompressor,IOStream})
GZIP, short for GNU Zip, is a compression/decompression format developed as part of a larger project to create a free software alternative to UNIX in the 1980s. This open source compression format does not support archiving, so it is used to compress single files. GZIP produces zipped files with the . gz extension.
Launch WinZip from your start menu or Desktop shortcut. Open the compressed file by clicking File > Open. If your system has the compressed file extension associated with WinZip program, just double-click on the file.
In the meantime you can use CSVFiles.jl:
using CSVFiles, DataFrames, FileIO
open("yourfile.csv.gz") do io
load(Stream(format"CSV", GzipDecompressorStream(io))) |> DataFrame
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With