Skip to content

Instantly share code, notes, and snippets.

@Bakkes
Bakkes / crctest.cpp
Created September 8, 2019 12:14
CRC slicing implementation test
#include <stdint.h>
#include <assert.h>
#include <string>
#include <vector>
#include <memory>
#include <chrono>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
{ 0x00, 0x49 }, // (7404)
{ 0x01, 0x68 }, // (8520)
{ 0x02, 0x0D }, // (167)
{ 0x03, 0x04 }, // (7)
{ 0x04, 0x47 }, // (3454)
{ 0x05, 0x13 }, // (21)
{ 0x06, 0x3B }, // (580)
{ 0x07, 0x18 }, // (1868)
{ 0x08, 0x61 }, // (58)
{ 0x09, 0x51 }, // (10)
old -> new (occurences)
16 -> 6e (8647)
01 -> 68 (8520)
00 -> 49 (7404)
19 -> 60 (4714)
04 -> 47 (3454)
53 -> 4d (2693)
0b -> 2b (2260)
0f -> 1c (2182)
1c -> 4a (1940)