Typedefs | |
typedef struct lzma_index_hash_s | lzma_index_hash |
Opaque data type to hold the Index hash. | |
Functions | |
LZMA_API (lzma_index_hash *) lzma_index_hash_init(lzma_index_hash *index_hash | |
Allocate and initialize a new lzma_index_hash structure. | |
LZMA_API (void) lzma_index_hash_end(lzma_index_hash *index_hash | |
Deallocate lzma_index_hash structure. | |
LZMA_API (lzma_ret) lzma_index_hash_append(lzma_index_hash *index_hash | |
Add a new Record to an Index hash. | |
LZMA_API (lzma_vli) lzma_index_hash_size(const lzma_index_hash *index_hash) lzma_attr_pure | |
Get the size of the Index field as bytes. | |
Variables | |
lzma_allocator *allocator | lzma_attr_warn_unused_result |
lzma_allocator * | allocator |
lzma_vli | unpadded_size |
const uint8_t * | in |
const uint8_t size_t * | in_pos |
Instead of constructing complete Index while decoding Blocks, Index hash calculates a hash of the Block sizes and Index, and then compares the hashes. This way memory usage is constant even with large number of Blocks and huge Index.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
typedef struct lzma_index_hash_s lzma_index_hash |
Opaque data type to hold the Index hash.
LZMA_API | ( | lzma_index_hash * | ) |
Allocate and initialize a new lzma_index_hash structure.
If index_hash is NULL, a new lzma_index_hash structure is allocated, initialized, and a pointer to it returned. If allocation fails, NULL is returned.
If index_hash is non-NULL, it is reinitialized and the same pointer returned. In this case, return value cannot be NULL or a different pointer than the index_hash that was given as an argument.
LZMA_API | ( | void | ) |
Deallocate lzma_index_hash structure.
Free memory allocated for the coder data structures.
LZMA_API | ( | lzma_ret | ) |
Add a new Record to an Index hash.
Calculate Block Header Size.
Decode and validate the Index field.
index | Pointer to a lzma_index_hash structure | |
unpadded_size | Unpadded Size of a Block | |
uncompressed_size | Uncompressed Size of a Block |
This function doesn't use lzma_stream structure to pass the input data. Instead, the input buffer is specified using three arguments. This is because it matches better the internal APIs of liblzma.
index_hash | Pointer to a lzma_index_hash structure | |
in | Pointer to the beginning of the input buffer | |
in_pos | in[*in_pos] is the next byte to process | |
in_size | in[in_size] is the first byte not to process |
LZMA_API | ( | uint64_t | ) | const |
Get the size of the Index field as bytes.
This is needed to verify the Backward Size field in the Stream Footer.
Get the size of the Index field as bytes.
Calculate rough memory requirements for raw encoder.
Calculate Unpadded Size.
Get the memory usage of decoder filter chain.
Calculates CRC64 using the polynomial from the ECMA-182 standard.
This function is used similarly to lzma_crc32(). See its documentation.
References LZMA_VLI_UNKNOWN.