Skip to content

Latest commit

 

History

History
53 lines (33 loc) · 3.63 KB

README.md

File metadata and controls

53 lines (33 loc) · 3.63 KB

crc32c v1.2

This is an amalgamation of Mark Adler's hardware-accelerated C-language implementation of the CRC-32C (Castagnoli) algorithm as found on Stack Overflow, additional code of his, and some other bits and bobs created by me (Dan Cassidy), all in order to create a crc32c binary that could be easily compiled.

None of the C code was developed by me. I simply collected the disparate parts, tweaked things ever so slightly, added a few complimentary files, and stuck the resultant bits in a git repo.

Compiling

NOTE: Requires make and gcc.

Run make.

Installing

Run sudo make install to install the crc32c binary to "/usr/local/bin" (compiling it first, if necessary).

Alternatively, you can just manually copy the binary to wherever you need it.

Usage

crc32c [[-]nnn] < data will checksum anything passed in via the stdin stream nnn times (defaults to 1), preferably using the hardware implementation. If nnn is negative, the software implementation is forced.

  • echo "foo" > foo.txt; crc32c < foo.txt: 9626347b
  • crc32c <<< "text to checksum": c748368b
  • echo "more text to checksum" | crc32c: bc55db06

File Origins

Licenses