Code Monkey home page Code Monkey logo

crc-any's Introduction

Hi, welcome to my Github pages.

Things Related to My Projects

Rust JavaScript TypeScript Java C PHP Golang Bash

Ubuntu Server Linux Mint Android Windows

Tokio Rocket Axum napi-rs iced Node.js Webpack Express Fastify NestJS + Fastify Bootstrap Vite Vue.js Handlebars Tera Sass Nginx Apache httpd Docker

MySQL SQLite MongoDB Redis

crc-any's People

Contributors

a1ien avatar alyoshavasilieva avatar dependabot[bot] avatar ignatenkobrain avatar jonas-schievink avatar magiclen avatar rursprung avatar totalkrill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

crc-any's Issues

LookUpTable enum size of static array

When I tested the new LookUpTable enum, I came to the result that this improves performance but not memory usage. The problem is, that the enum has the size of it's largest type playground. So, it is as large as the variant LookUpTable::Dynamic.

I don't know if this can be resolved nicely.

Bad documentation. Not found all Rocksoft™ Model parameters

Hello.

My comments on the project documentation.

  1. The Rocksoft model involves specifying the Check parameter - this is the result of calculating the checksum of the string “123456789”. Ready-made algorithms in your crate have names, but in the description for them there is no indication of all the parameters. Parameters (except for the Check parameter) can be seen in the comments on the functions inside the source, which is not very convenient.
  2. I also want to note the execution of tests. It would be more profitable to use the specified string "123456789" instead of specifying the URL of your site.

Why is it important? For example, I know the parameters of the CRC algorithm for the one used in my work (this is a widely used CRC algorithm). Of course I can fill them out for the generalized function of CRC, but I would like to get a specific instance. It is possible that the developer of the CRC library has performed some optimizations and the specialized version will work faster.
The description "this is the algorithm used in zlib or just CRC32" means nothing !!! Practice shows that all people use different algorithms under the same name.
I did not find a ready-made algorithm in your library (I checked by the combination of the polynomial / xor in / out, reflect). But!!! Many CRC algorithms are twins - they have different parameters, but the result of their work is the same. If you indicated all the parameters of the algorithm (including Check) in the documentation for ready-made algorithms, I would have found mine within half a minute. Instead, I study the sources and write this issue.

no_std in newer versions?

Trying to use this crate from a no_std point, is there any reason it was removed?

the package `mypackage` depends on `crc-any`, with features: `no_std` but `crc-any` does not have these features.

Bad crc creation performance.

If we create crc with static know table we always copy table for this new crc instance which wast time for copy.
We can do better by something like this.

//pub(crate) const NO_REF_16_0589: [u16; 256] = ....;
enum LookUpTable {
    Static(&'static [u16]),
    Dynamic([u16;256]),
}
impl std::ops::Deref for LookUpTable {
    type Target = [u16];
    fn deref(&self) -> &[u16] {
        match self {
            LookUpTable::Static(s) => s,
            LookUpTable::Dynamic(d) => d
        }
    }
}
struct Crc {
    lookup_table: LookUpTable
}

let s = Crc {
     lookup_table: LookUpTable::Static(&NO_REF_16_0589),
};
    
    let d = Crc {
        lookup_table: LookUpTable::Dynamic([0;256]),
};

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.