CRC32 calculation (size-optimized). More...
#include "check.h"
Functions | |
static void | crc32_init (void) |
void | lzma_crc32_init (void) |
uint32_t | lzma_crc32 (const uint8_t *buf, size_t size, uint32_t crc) |
Calculate CRC32. | |
Variables | |
uint32_t | lzma_crc32_table [1][256] |
CRC32 calculation (size-optimized).
uint32_t lzma_crc32 | ( | const uint8_t * | buf, | |
size_t | size, | |||
uint32_t | crc | |||
) |
Calculate CRC32.
Calculate CRC32 using the polynomial from the IEEE 802.3 standard.
buf | Pointer to the input buffer | |
size | Size of the input buffer | |
crc | Previously returned CRC value. This is used to calculate the CRC of a big buffer in smaller chunks. Set to zero when starting a new calculation. |
References lzma_crc32_table.
Referenced by lzma_block_header_decode(), lzma_block_header_encode(), lzma_check_update(), lzma_index_hash_decode(), lzma_stream_footer_decode(), lzma_stream_footer_encode(), lzma_stream_header_decode(), and lzma_stream_header_encode().
uint32_t lzma_crc32_table[1][256] |
lzma_crc32_table[0] is needed by LZ encoder so we need to keep the array two-dimensional.
Referenced by lzma_crc32().