Skip to content
/ crc32c Public

Mark Adler's hardware-accelerated C-language implementation of the CRC-32C (Castagnoli) algorithm in a form that can be easily compiled.

Notifications You must be signed in to change notification settings

rux616/crc32c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Mark Adler's hardware-accelerated C-language implementation of the CRC-32C (Castagnoli) algorithm in a form that can be easily compiled.

Topics

Resources

Stars

Watchers

Forks