class CRC::CRC32c

Overview

Implements the CRC32c algorithm.

Defined in:

crc/crc32c.cr

Constant Summary

TABLE = [0, 4067132163_i64, 3778769143_i64, 324072436, 3348797215_i64, 904991772, 648144872, 3570033899_i64, 2329499855_i64, 2024987596, 1809983544, 2575936315_i64, 1296289744, 3207089363_i64, 2893594407_i64, 1578318884, 274646895, 3795141740_i64, 4049975192_i64, 51262619, 3619967088_i64, 632279923, 922689671, 3298075524_i64, 2592579488_i64, 1760304291, 2075979607, 2312596564_i64, 1562183871, 2943781820_i64, 3156637768_i64, 1313733451, 549293790, 3537243613_i64, 3246849577_i64, 871202090, 3878099393_i64, 357341890, 102525238, 4101499445_i64, 2858735121_i64, 1477399826, 1264559846, 3107202533_i64, 1845379342, 2677391885_i64, 2361733625_i64, 2125378298, 820201905, 3263744690_i64, 3520608582_i64, 598981189, 4151959214_i64, 85089709, 373468761, 3827903834_i64, 3124367742_i64, 1213305469, 1526817161, 2842354314_i64, 2107672161, 2412447074_i64, 2627466902_i64, 1861252501, 1098587580, 3004210879_i64, 2688576843_i64, 1378610760, 2262928035_i64, 1955203488, 1742404180, 2511436119_i64, 3416409459_i64, 969524848, 714683780, 3639785095_i64, 205050476, 4266873199_i64, 3976438427_i64, 526918040, 1361435347, 2739821008_i64, 2954799652_i64, 1114974503, 2529119692_i64, 1691668175, 2005155131, 2247081528_i64, 3690758684_i64, 697762079, 986182379, 3366744552_i64, 476452099, 3993867776_i64, 4250756596_i64, 255256311, 1640403810, 2477592673_i64, 2164122517_i64, 1922457750, 2791048317_i64, 1412925310, 1197962378, 3037525897_i64, 3944729517_i64, 427051182, 170179418, 4165941337_i64, 746937522, 3740196785_i64, 3451792453_i64, 1070968646, 1905808397, 2213795598_i64, 2426610938_i64, 1657317369, 3053634322_i64, 1147748369, 1463399397, 2773627110_i64, 4215344322_i64, 153784257, 444234805, 3893493558_i64, 1021025245, 3467647198_i64, 3722505002_i64, 797665321, 2197175160_i64, 1889384571, 1674398607, 2443626636_i64, 1164749927, 3070701412_i64, 2757221520_i64, 1446797203, 137323447, 4198817972_i64, 3910406976_i64, 461344835, 3484808360_i64, 1037989803, 781091935, 3705997148_i64, 2460548119_i64, 1623424788, 1939049696, 2180517859_i64, 1429367560, 2807687179_i64, 3020495871_i64, 1180866812, 410100952, 3927582683_i64, 4182430767_i64, 186734380, 3756733383_i64, 763408580, 1053836080, 3434856499_i64, 2722870694_i64, 1344288421, 1131464017, 2971354706_i64, 1708204729, 2545590714_i64, 2229949006_i64, 1988219213, 680717673, 3673779818_i64, 3383336350_i64, 1002577565, 4010310262_i64, 493091189, 238226049, 4233660802_i64, 2987750089_i64, 1082061258, 1395524158, 2705686845_i64, 1972364758, 2279892693_i64, 2494862625_i64, 1725896226, 952904198, 3399985413_i64, 3656866545_i64, 731699698, 4283874585_i64, 222117402, 510512622, 3959836397_i64, 3280807620_i64, 837199303, 582374963, 3504198960_i64, 68661723, 4135334616_i64, 3844915500_i64, 390545967, 1230274059, 3141532936_i64, 2825850620_i64, 1510247935, 2395924756_i64, 2091215383, 1878366691, 2644384480_i64, 3553878443_i64, 565732008, 854102364, 3229815391_i64, 340358836, 3861050807_i64, 4117890627_i64, 119113024, 1493875044, 2875275879_i64, 3090270611_i64, 1247431312, 2660249211_i64, 1828433272, 2141937292, 2378227087_i64, 3811616794_i64, 291187481, 34330861, 4032846830_i64, 615137029, 3603020806_i64, 3314634738_i64, 939183345, 1776939221, 2609017814_i64, 2295496738_i64, 2058945313, 2926798794_i64, 1545135305, 1330124605, 3173225534_i64, 4084100981_i64, 17165430, 307568514, 3762199681_i64, 888469610, 3332340585_i64, 3587147933_i64, 665062302, 2042050490, 2346497209_i64, 2559330125_i64, 1793573966, 3190661285_i64, 1279665062, 1595330642, 2910671697_i64] of UInt32

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

Constructors

Instance methods inherited from class CRC::CRC32

final_impl(dst : Bytes) : Nil final_impl, update_impl(data : Bytes) : Nil update_impl

Constructor methods inherited from class CRC::CRC32

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

Class methods inherited from class CRC::CRC32

init_crc init_crc, xor_mask xor_mask

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

<<(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(UInt32)

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

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

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]