Why does BCL GZipStream (with StreamReader) not reliably detect Data Errors with CRC32?

Preface .NET [4 and previous] users should not use the Microsoft-provided GZipStream or DeflateStream classes under any circumstances, unless Microsoft replaces them completely with something that works. Use the DotNetZip library instead. Update to Preface The .NET Framework 4.5 and later have fixed the compression problem, and GZipStream and DeflateStream use zlib in those versions. … Read more

JavaScript CRC32

Update I added a helper function to create the CRCTable instead of having this enormous literal in the code. It could also be used to create the table once and save it in an object or variable and have the crc32 function use that (or as W3C’s example, check for the existence and create if … Read more

How do I calculate CRC32 of a string

This guy seems to have your answer. https://damieng.com/blog/2006/08/08/calculating_crc32_in_c_and_net And in case the blog ever goes away or breaks the url, here’s the github link: https://github.com/damieng/DamienGKit/blob/master/CSharp/DamienG.Library/Security/Cryptography/Crc32.cs Usage of the Crc32 class from the blog post: Crc32 crc32 = new Crc32(); String hash = String.Empty; using (FileStream fs = File.Open(“c:\\myfile.txt”, FileMode.Open)) foreach (byte b in crc32.ComputeHash(fs)) hash … Read more

Implementing SSE 4.2’s CRC32C in software

Here are both software and hardware versions of CRC-32C. The software version is optimized to process eight bytes at a time. The hardware version is optimized to run three crc32q instructions effectively in parallel on a single core, since the throughput of that instruction is one cycle, but the latency is three cycles. crc32c.c: /* … Read more