CRC checksums (CRC-16, CRC-32, CRC-32C) for OCaml
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove ocaml-chunk (not a standard protocol)

Application-layer chunking is custom, not CCSDS/RFC.

+2 -2
+2 -2
lib/crc.ml
··· 73 73 let crc = ref 0xFFFFFFFFl in 74 74 for i = 0 to String.length data - 1 do 75 75 let byte = Int32.of_int (Char.code (String.unsafe_get data i)) in 76 - let idx = Int32.to_int ((!crc lxor byte) land 0xFFl) in 76 + let idx = Int32.to_int (!crc lxor byte land 0xFFl) in 77 77 crc := table.(idx) lxor (!crc lsr 8) 78 78 done; 79 79 Int32.to_int (!crc lxor 0xFFFFFFFFl) ··· 82 82 let crc = ref 0xFFFFFFFFl in 83 83 for i = off to off + len - 1 do 84 84 let byte = Int32.of_int (Char.code (Bytes.unsafe_get buf i)) in 85 - let idx = Int32.to_int ((!crc lxor byte) land 0xFFl) in 85 + let idx = Int32.to_int (!crc lxor byte land 0xFFl) in 86 86 crc := table.(idx) lxor (!crc lsr 8) 87 87 done; 88 88 Int32.to_int (!crc lxor 0xFFFFFFFFl)