rockbox: add a crc32 reverse polynomial function

This uses the reverse of the polynomial used by the current crc_32
function. The code for this was derived from the implementation used
by tinf. This version is space optimized and should be a good way to
reduce code duplication in other parts of rockbox that use the same
crc32 algorithm. This is mainly of use in areas where DEFLATE is in
use.

Change-Id: I918da5b4ea4dc441c0e7e6b5007abcc2da463bcb
This commit is contained in:
James Buren 2021-06-21 03:37:17 +00:00
parent 2ca5774cf9
commit fc92081080
4 changed files with 33 additions and 0 deletions

View file

@ -24,6 +24,7 @@
#define _CRC32_H
uint32_t crc_32(const void *src, uint32_t len, uint32_t crc32);
uint32_t crc_32r(const void *src, uint32_t len, uint32_t crc32);
#endif