crc32_small.c File Reference

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]

## Detailed Description

CRC32 calculation (size-optimized)

## Function Documentation

## lzma_crc32()

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.

Parameters

  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.

Returns
  Updated CRC value, which can be passed to this function again to continue CRC calculation.

Referenced by lzma_check_update().

## Variable Documentation

## lzma_crc32_table

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.