tags:

views:

6066

answers:

4

I'm looking for an implementation of CRC32 in C or C++ that is explicitly licensed as being free or public domain. The implementation here seems nice, but the only thing it says about the license is "source code", which isn't good enough. I'd prefer non LGPL so I don't have to fool around with a DLL (my app is closed source). I saw the adler32 implementation in zlib, but I'm checking small chunks of data, which adler is not good for.

Thanks!

+9  A: 

Use the Boost C++ libraries. There is a CRC included there and the license is good.

Zan Lynx
Yup, I've used the CRC32 in Boost with very satisfying results. +1 from me.
Andreas Magnusson
+9  A: 

The SNIPPETS C Source Code Archive has a CRC32 implementation that is freely usable:

/* Copyright (C) 1986 Gary S. Brown.  You may use this program, or
   code or tables extracted from it, as desired without restriction.*/
cjm
+5  A: 

I am the author of the source code at the specified link. While the intention of the source code license is not clear (it will be later today), the code is in fact open and free for use in your free or commercial applications with no strings attached.

NTDLS
Hey Josh, that is really awesome. Thanks so much for clearing that up. I've been through an acquisition before and they were super-picky about the license of every chunk of code I was using.
twk
+1  A: 

pycrc is a Python script that generates C CRC code, with options to select the CRC size, algorithm and model.

It's released under the MIT licence. Is that acceptable for your purposes?

therefromhere