comments: core/Crc16 header
This commit is contained in:
1 parent
fd606b8225
commit
1cdc76a339
1 file changed
+3
-5
@@ -1,10 +1,8 @@
|
|||||||
--!strict
|
--!strict
|
||||||
--!native
|
--!native
|
||||||
-- core/Crc16: the two 16-bit CRCs old archive and encoding formats use, table driven. New code.
|
-- core/Crc16: the 16-bit CRCs old archive formats use, table driven. New code. ccitt: CRC-16/XMODEM (0x1021, MSB first,
|
||||||
-- Crc16.ccitt(buf, off, len, crc?) CRC-16/XMODEM: polynomial 0x1021, MSB first, init 0, no final XOR (BinHex 4.0,
|
-- init 0, no final XOR; BinHex 4.0, MacBinary II / III). arc: CRC-16/ARC (0x8005 reflected = 0xA001, init 0; LHA, Zoo,
|
||||||
-- MacBinary II / III headers)
|
-- ARC). Never throws: the range is clamped.
|
||||||
-- Crc16.arc(buf, off, len, crc?) CRC-16/ARC: polynomial 0x8005 reflected (0xA001), init 0 (LHA, Zoo, ARC)
|
|
||||||
-- Pass a previous result as crc to continue it. Never throws: the range is clamped to the buffer.
|
|
||||||
local band, bxor, rshift, lshift = bit32.band, bit32.bxor, bit32.rshift, bit32.lshift
|
local band, bxor, rshift, lshift = bit32.band, bit32.bxor, bit32.rshift, bit32.lshift
|
||||||
local readu8 = buffer.readu8
|
local readu8 = buffer.readu8
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user