mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 08:38:14 +01:00
Add commentary about the CRC-32 implementation
This commit is contained in:
1 parent
7bdbab9e08
commit
34fe051cac
4 files changed
+285
-21
No files matched your search
@@ -37,10 +37,8 @@ func main1() error {
|
||||
tables := [16]crc32.Table{}
|
||||
tables[0] = *crc32.MakeTable(crc32.IEEE)
|
||||
|
||||
// This slicing-by-N table generation algorithm is based on that from Go's
|
||||
// standard library (the hash/crc32 package).
|
||||
//
|
||||
// See also https://create.stephan-brumme.com/crc32/#slicing-by-16-overview
|
||||
// See "Multi-Byte Lookup Tables" in std/crc32/README.md for more detail on
|
||||
// the slicing-by-M algorithm. We use an M of 16.
|
||||
for i := 0; i < 256; i++ {
|
||||
crc := tables[0][i]
|
||||
for j := 1; j < 16; j++ {
|
||||
|
||||
Reference in new issue
Block a user