sharpcompress icon indicating copy to clipboard operation
sharpcompress copied to clipboard

Cannot extract large file from TAR file

Open yarong-lifemap opened this issue 3 years ago • 1 comments

Example file: https://ftp.ebi.ac.uk/pub/databases/chembl/ChEMBLdb/latest/chembl_30_sqlite.tar.gz When trying to extract the file called "chembl_30.db" file size = 0 and extraction fails.

using (Stream stream = File.OpenRead(@"chembl_30_sqlite.tar.gz"))
using (var reader = ReaderFactory.Open(stream))
{
    while (reader.MoveToNextEntry())
    {
        if (!reader.Entry.IsDirectory)
        {
            Console.WriteLine(reader.Entry.Key);
            Console.WriteLine(reader.Entry.Size);
        }
    }
}

yarong-lifemap avatar Mar 13 '22 00:03 yarong-lifemap

Hint: For this to work we need to add support/parsing of the pax extension, the size is listed there.

Erior avatar Jul 02 '22 09:07 Erior