Add #no_bounds_check to crc procedures

This commit is contained in:
gingerBill
2020-10-14 16:00:08 +01:00
parent 8806283cf7
commit de13584be2

View File

@@ -1,13 +1,13 @@
package hash
crc32 :: proc(data: []byte) -> u32 {
crc32 :: proc(data: []byte) -> u32 #no_bounds_check {
result := ~u32(0);
for b in data {
result = result>>8 ~ _crc32_table[(result ~ u32(b)) & 0xff];
}
return ~result;
}
crc64 :: proc(data: []byte) -> u64 {
crc64 :: proc(data: []byte) -> u64 #no_bounds_check {
result := ~u64(0);
for b in data {
result = result>>8 ~ _crc64_table[(result ~ u64(b)) & 0xff];