class CRC::CRC15

Overview

Implements the CRC15 algorithm.

Defined in:

crc/crc15.cr

Constant Summary

TABLE = [0, 17817, 20139, 2866, 22735, 7510, 5732, 21501, 29703, 12702, 15020, 32565, 11464, 26961, 25187, 10234, 11671, 26638, 25404, 9893, 30040, 12481, 15347, 32362, 22928, 7177, 5947, 21154, 351, 17606, 20468, 2669, 23342, 7863, 5509, 20508, 993, 18040, 19786, 2259, 12073, 27312, 24962, 9243, 30694, 12927, 14669, 31956, 30393, 13088, 14354, 32139, 11894, 27631, 24797, 9540, 702, 18215, 19477, 2444, 23153, 8168, 5338, 20803, 29637, 13916, 15726, 30967, 11018, 28307, 26017, 8248, 1986, 16987, 18793, 3312, 24333, 6804, 4518, 21567, 24146, 7115, 4345, 21856, 1693, 17156, 18486, 3503, 10837, 28620, 25854, 8551, 29338, 14083, 15409, 31144, 10475, 28018, 26176, 9177, 28708, 13757, 16015, 31510, 23788, 6517, 4679, 22494, 1059, 16826, 19080, 3857, 1404, 16613, 19415, 3662, 23987, 6186, 4888, 22145, 29051, 13538, 16336, 31305, 10676, 27693, 26399, 8838, 8723, 26506, 27832, 10529, 31452, 16197, 13431, 29166, 22036, 5005, 6335, 23846, 3803, 19266, 16496, 1513, 3972, 18973, 16687, 1206, 22347, 4818, 6624, 23673, 31619, 15898, 13608, 28849, 9036, 26325, 28135, 10366, 31037, 15524, 14230, 29199, 8690, 25707, 28505, 10944, 3386, 18595, 17297, 1544, 22005, 4204, 7006, 24263, 21674, 4403, 6657, 24472, 3173, 18940, 17102, 1879, 8365, 25908, 28166, 11167, 30818, 15867, 14025, 29520, 20950, 5199, 8061, 23268, 2329, 19584, 18354, 555, 9681, 24648, 27514, 12003, 32030, 14471, 13237, 30252, 31809, 14808, 13034, 30579, 9358, 24855, 27173, 12220, 2118, 19935, 18157, 884, 20617, 5392, 7714, 23483, 2808, 20321, 17491, 458, 21047, 6062, 7324, 22789, 32511, 15206, 12372, 30157, 9776, 25513, 26779, 11522, 10095, 25334, 27076, 11357, 32672, 14905, 12555, 29842, 21352, 5873, 7619, 22618, 2983, 20030, 17676, 149] of UInt16

Generated by ./pycrc.py --algorithm=table-driven --model=crc-16 --generate=c

Constructors

Instance Method Summary

Instance methods inherited from class CRC::Base(UInt16)

<<(data) <<, checksum : UINT checksum, digest_size : Int32 digest_size, final_impl(dst : Bytes) : Nil final_impl, reset_impl : Nil reset_impl, update_impl(data : Bytes) : Nil update_impl

Constructor methods inherited from class CRC::Base(UInt16)

new(crc : UINT = self.class.init_crc) new

Class methods inherited from class CRC::Base(UInt16)

checksum(data) : UINT checksum, init_crc : UINT init_crc, xor_mask : UINT xor_mask

Constructor Detail

def self.new(crc : UINT = self.class.init_crc) #

Initializes the CRC instance.


[View source]

Instance Method Detail

def final_impl(dst : Bytes) : Nil #

The packed CRC15 result.


[View source]
def update_impl(data : Bytes) : Nil #

Updates the CRC15 checksum.

@param [String] data The data to update the checksum with.


[View source]