comments: core/Crc16 header

This commit is contained in:
4DBug committed 2026-11-01 01:57:14 -05:00
1 parent fd606b8225
commit 1cdc76a339
1 file changed
+3 -5
+3 -5
View File
@@ -1,10 +1,8 @@
--!strict
--!native
-- core/Crc16: the two 16-bit CRCs old archive and encoding formats use, table driven. New code.
-- Crc16.ccitt(buf, off, len, crc?) CRC-16/XMODEM: polynomial 0x1021, MSB first, init 0, no final XOR (BinHex 4.0,
-- MacBinary II / III headers)
-- 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.
-- core/Crc16: the 16-bit CRCs old archive formats use, table driven. New code. ccitt: CRC-16/XMODEM (0x1021, MSB first,
-- init 0, no final XOR; BinHex 4.0, MacBinary II / III). arc: CRC-16/ARC (0x8005 reflected = 0xA001, init 0; LHA, Zoo,
-- ARC). Never throws: the range is clamped.
local band, bxor, rshift, lshift = bit32.band, bit32.bxor, bit32.rshift, bit32.lshift
local readu8 = buffer.readu8