XZ Utils
5.2.8
|
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. More... | |
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. |
Referenced by lzma_check_update().
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.