psi: improved comment for updateCrc

This commit is contained in:
saxon 2019-01-07 16:18:20 +10:30
parent 261118187b
commit 6ebb982238
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ func addCrc(out []byte) []byte {
return out return out
} }
// updateCrc updates the crc of psi bytes slice that may have been modified // updateCrc updates the crc of bytes slice, writing the checksum into the last four bytes.
func updateCrc(out []byte) []byte { func updateCrc(out []byte) []byte {
crc32 := crc32_Update(0xffffffff, crc32_MakeTable(bits.Reverse32(crc32.IEEE)), out[1:len(out)-4]) crc32 := crc32_Update(0xffffffff, crc32_MakeTable(bits.Reverse32(crc32.IEEE)), out[1:len(out)-4])
out[len(out)-4] = byte(crc32 >> 24) out[len(out)-4] = byte(crc32 >> 24)