mrhooray / crc-rs

Rust implementation of CRC(16, 32, 64) with support of various standards
Apache License 2.0
187 stars 49 forks source link

expose tables in API #112

Closed mammothbane closed 5 months ago

mammothbane commented 7 months ago

I'm writing a RAM stub in assembly for an embedded system that I'm going to use to quickly CRC regions of flash memory as part of the process of flashing an MCU. I was going to use this crate to generate CRC lookup tables that I would also load via the debug probe at a known address to accelerate this, but the table-access functionality is private — I just need the whole table that the crate already generates.

I can work around this -- I've just copy-pasted the crc8 and crc8_table functions into my crate, but for my use-case it'd be a nice, useful addition to this crate's API.

Would you accept a PR to expose the generated tables and table generation functions? I'd like to:

BKSalman commented 6 months ago

+1

(I also want this :))