mrhooray / crc-rs

Rust implementation of CRC(16, 32, 64) with support of various standards

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

replace `Digest::new` with table specific digests

vitiral opened this issue · comments

Is there a reason there isDigest::new instead of just:

  • Digest::new_ieee()
  • Digest::new_castagnoli()

where those methods just copy the already computed tables.

With #13 this could remove make_table from the library. If the user wants to use their own table, couldn't they compute it (using a new crate crc-table) and pass it in?

I'm willing to work on this.

I take back removing make_table from the library -- keep it in. But we should have table-specific digests that don't require using it (since they are precomputed)

But we should have table-specific digests that don't require using it

Could you clarify this given context of #13 #16?

Creating custom digest is not high frequent use case and creating the table/struct once might be okay. Do you have a specific reason against doing so?

I think this isn't really that importnat anymore.

Thanks