I have the problem of needing to compare files in .tar.gz files to ensure none of the files within the gzip are duplicates. I am currently using ICSharpCode.SharpZipLib, which makes it easy to check for duplicates in Zip files since a ZipEntry has a "CRC" property. This is pretty straightforward, since I can get the crc and filesize, and use LINQ to find any files that match in hash and size and then throw an error or do whatever is necessary.
However, TarEntry has no such property or method, aside from the standard GetHashCode method, which to my understanding also computes the hash from the file metadata, hence copies of the same file do not have the same hash. Is there a way I can (quickly) compute the hash of the contents of the gzip files? Or is there another way to compare the contents?