sharpcompress
sharpcompress copied to clipboard
tar.gz uncompressing always leads to no tar.entries
There is valid one.tar.gz file - one.tar.gz Tar contains one file.
When I try to uncompress it, tarArchive.Entries.Count == 0, but it should be 1 because tar contains one file
using (var archive = GZipArchive.Open("D:\\one.tar.gz")) {
GZipArchiveEntry gzipEntry = archive.Entries.First(); // gzipEntry value is right, i .e it contains details of tar file
Stream tarStream = gzipEntry.OpenEntryStream();
using (TarArchive tarArchive = TarArchive.Open(tarStream)) {
var cnt = tarArchive.Entries.Count;// tarArchive.Entries.Count == 0 but it should be 1
}
Same problem wih all tar.gz files
I use 0.40.0 latest nuget + .NET 9
Your use case is not supported, see #927.