Git Product home page Git Product logo

crc-catalog's Introduction

crc-catalog

crc-catalog implements numerous CRCs using a bitwise algorithm implemented as a single C++ template. This can be useful for verifying existing or new CRC algorithms. Well-known CRCs are implemented as specific functions with intuitive names. There are function bindings for both the C++ as well as the C language.

Using crc-catalog is straightforward. For instance, let's calculate the standard check of CRC16/CCITT-FALSE

#include <array>
#include <iomanip>
#include <iostream>

#include <crc_catalog.h>

int main()
{
  const std::array<std::uint8_t, 9U> crc_test_data =
  {{
    0x31U, 0x32U, 0x33U, 0x34U, 0x35U, 0x36U, 0x37U, 0x38U, 0x39U
  }};

  const std::uint16_t crc_result =
    crc::catalog::crc_crc16_ccitt_false(crc_test_data.data(), crc_test_data.size());

  const bool crc_result_is_ok = (crc_result == UINT16_C(0x29B1));

  std::cout << "crc_result_is_ok: " << std::boolalpha << crc_result_is_ok << std::endl;
}

For additional information on the parameters and origins of most of these CRCs implemented in this repo, see also http://reveng.sourceforge.net/crc-catalogue/

crc-catalog's People

Contributors

ckormanyos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

crc-catalog's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.