Closed henry2004y closed 3 years ago
I assume this package should be able to untar a file compressed by gzip
It is typical to compress tarballs when saving of transferring them. In the UNIX tradition of doing one thing and doing it well, the
Tar
package does not do any kind of compression and instead makes it easy to compose it's API with external compression tools. The simplest way to read a compressed archive is to use a command-line tool to decompress it. For example:Tar.list(`gzcat $tarball`) Tar.extract(`gzcat $tarball`)
Despite the simple extension .tar
, your archive is compressed
% file bulk_vlsv.tar
bulk_vlsv.tar: gzip compressed data, last modified: Sat Jan 23 09:05:21 2021, from Unix, original size modulo 2^32 5171200
Sorry I am not familiar at all with the concepts here. So what should I do to fulfill my goal then?
On Linux/Mac, using the command line works well:
run(`tar -zxvf bulk_vlsv.tar`)
But how should I do this on Windows?
If you want to use external commands (like tar
), you need to have them installed.
If you want to do everything with Julia, you can use for example CodecZlib.jl
together with Tar.jl
:
julia> using CodecZlib, Tar
julia> open("bulk_vlsv.tar") do io
Tar.extract(GzipDecompressorStream(io))
end
"/tmp/jl_mf7624"
Thanks!
Hi,
I found this package when I was having issue to do a cross-platform extracting for my package test data. I assume this package should be able to untar a file compressed by gzip. I have a sample data file and was trying to unzip it with
but I got
Any idea what's going on?
Attached test file: test file