![]() |
Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
|
Go to the source code of this file.
Macros | |
#define | LZMA_VLI_MAX (UINT64_MAX / 2) |
Maximum supported value of a variable-length integer. | |
#define | LZMA_VLI_UNKNOWN UINT64_MAX |
VLI value to denote that the value is unknown. | |
#define | LZMA_VLI_BYTES_MAX 9 |
Maximum supported encoded length of variable length integers. | |
#define | LZMA_VLI_C(n) |
VLI constant suffix. | |
#define | lzma_vli_is_valid(vli) |
Validate a variable-length integer. | |
Functions | |
LZMA_API (lzma_ret) lzma_vli_encode(lzma_vli vli | |
Encode a variable-length integer. | |
LZMA_API (uint32_t) lzma_vli_size(lzma_vli vli) lzma_nothrow lzma_attr_pure | |
Get the number of bytes required to encode a VLI. | |
Variables | |
size_t * | vli_pos |
size_t uint8_t * | out |
size_t uint8_t size_t * | out_pos |
size_t uint8_t size_t size_t out_size | lzma_nothrow |
size_t const uint8_t * | in |
size_t const uint8_t size_t * | in_pos |
#define LZMA_VLI_BYTES_MAX 9 |
Maximum supported encoded length of variable length integers.
#define LZMA_VLI_C | ( | n | ) |
#define lzma_vli_is_valid | ( | vli | ) |
Validate a variable-length integer.
This is useful to test that application has given acceptable values for example in the uncompressed_size and compressed_size variables.
#define LZMA_VLI_MAX (UINT64_MAX / 2) |
Maximum supported value of a variable-length integer.
#define LZMA_VLI_UNKNOWN UINT64_MAX |
VLI value to denote that the value is unknown.
|
extern |
Encode a variable-length integer.
Decode a variable-length integer.
This function has two modes: single-call and multi-call. Single-call mode encodes the whole integer at once; it is an error if the output buffer is too small. Multi-call mode saves the position in *vli_pos, and thus it is possible to continue encoding if the buffer becomes full before the whole integer has been encoded.
vli | Integer to be encoded | |
[out] | vli_pos | How many VLI-encoded bytes have already been written out. When starting to encode a new integer in multi-call mode, *vli_pos must be set to zero. To use single-call encoding, set vli_pos to NULL. |
[out] | out | Beginning of the output buffer |
[out] | out_pos | The next byte will be written to out[*out_pos]. |
out_size | Size of the out buffer; the first byte into which no data is written to is out[out_size]. |
Single-call (vli_pos == NULL):
Multi-call (vli_pos != NULL):
Like lzma_vli_encode(), this function has single-call and multi-call modes.
[out] | vli | Pointer to decoded integer. The decoder will initialize it to zero when *vli_pos == 0, so application isn't required to initialize *vli. |
[out] | vli_pos | How many bytes have already been decoded. When starting to decode a new integer in multi-call mode, *vli_pos must be initialized to zero. To use single-call decoding, set vli_pos to NULL. |
in | Beginning of the input buffer | |
[out] | in_pos | The next byte will be read from in[*in_pos]. |
in_size | Size of the input buffer; the first byte that won't be read is in[in_size]. |
Single-call (vli_pos == NULL):
Multi-call (vli_pos != NULL):
|
extern |
Get the number of bytes required to encode a VLI.
vli | Integer whose encoded size is to be determined |
Get the number of bytes required to encode a VLI.
Run-time version number as an integer.
Get the number of processor cores or threads.
Calculate CRC32.
Although not all Check IDs have a check algorithm associated, the size of every Check is already frozen. This function returns the size (in bytes) of the Check field with the specified Check ID. The values are: { 0, 4, 4, 4, 8, 8, 8, 16, 16, 16, 32, 32, 32, 64, 64, 64 }
If the argument is not in the range [0, 15], UINT32_MAX is returned.
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. |
size_t const uint8_t* in |
size_t const uint8_t size_t* in_pos |
size_t uint8_t* out |
size_t uint8_t size_t* out_pos |
size_t* vli_pos |