GithubHelp home page GithubHelp logo

sonnenbrille's Introduction

Sonnenbrille

"Son­nen­bril­le, die -- Brille mit dunkel getönten Gläsern, die die Augen vor zu starker Helligkeit des Sonnenlichts schützen soll" -- Duden

"Sunglasses, feminine -- Glasses with dark-toned lenses, that protect the eyes from bright sunlight"

There are many articles, references and online resources for the Cyclic Redundancy Check, but I was surprised and greatly helped by the clarity and comprehensiveness of Sunshine 2K's Understanding and implementing CRC (Cyclic Redundancy Check) calculation. Along with the author's online implementation, this illuminating article made it possible for me to understand, implement and test an 8-bit CRC calculator in Rust.

extern crate sonnenbrille;
use sonnenbrille::CRC8;

fn crc8(num: u32): u8 {
    let calculator = CRC8::default();
    return calculator.of(&num.to_be_bytes(), 0x00);
}

fn main() {
    let num: u32 = 0x31313233;
    let calculator = CRC8::default();
    let checksum = calculator.of(&num.to_be_bytes(), 0x00);
    assert_eq!(checksum, 0x7F);
}

sonnenbrille's People

Contributors

solidsnack avatar

Watchers

 avatar  avatar

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.