Skip to content

m3db/stackadler32

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stackadler32

Note: This is a fork of github.com/sent-hil/adler32 that provides digests that are allocated on the stack and can be incrementally written to. This is useful for places where you perform concurrent checksumming and there's no good place to cache a digest without needing to acquire it expensively (under lock, etc).

Port of adler32 checksum function as described here: https://www.ietf.org/rfc/rfc1950.txt to Go.

Example:

 adler32.Checksum([]byte("Hello World"))

Tests

$ go test
PASS
ok      github.com/sent-hil/adler32     2.429s

$ go test -bench=.
# This library is slightly faster than the one in standard library.
$ go test -bench=.
BenchmarkThis-4            10000            230169 ns/op
BenchmarkStdLib-4          10000            190834 ns/op
PASS
ok      github.com/sent-hil/adler32     6.554s

About

Just a small library for calculating adler32 checksum.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%