sharpcompress
sharpcompress copied to clipboard
Cannot extract large file from TAR file
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);
}
}
}
Hint: For this to work we need to add support/parsing of the pax extension, the size is listed there.