Quantcast
Channel: sharpcompress Discussions Rss Feed
Viewing all articles
Browse latest Browse all 239

New Post: Help with crc property

$
0
0
Sorry about my english

I'm trying to get the CRC32 of a file ownership. However, the return shows a wrong result.
here's the code
Stream stream = File.OpenRead(@"C:\Test.rar");
var reader = ReaderFactory.Open(stream);
while(reader.MoveToNextEntry()) 
 {
       Label1.Content = reader.Entry.Crc.ToString();          
 }
The RAR file has only one file inside to test.
This code prints this value on label 4263732290 as if CRC

In Winrar, the value pointed to as CRC is FE236442, which is the same value I get when I calculate the uncompressed file.

then used the SevenZipSharp with the following code
SevenZipCompressor.SetLibraryPath(@"C:\7z.dll");
SevenZipExtractor zip = new SevenZipExtractor("Test.rar");
Label1.Content = zip.ArchiveFileData[0].Crc.ToString();
To my death, I got the same result (4263732290).
Is there something I'm doing wrong? I need to do another treatment with the warmth of the property to extract the calculation of CRC32??

Another thing I noticed in testing is that the other properties return the correct value (FilePath, CompressedSize, Size) everything works perfectly, minus the CRC32

Thanks for the help

Viewing all articles
Browse latest Browse all 239

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>