Rizin
unix-like reverse engineering framework and cli tools
|
Handling of Index. More...
#include "common.h"
Go to the source code of this file.
Macros | |
#define | UNPADDED_SIZE_MIN LZMA_VLI_C(5) |
Minimum Unpadded Size. More... | |
#define | UNPADDED_SIZE_MAX (LZMA_VLI_MAX & ~LZMA_VLI_C(3)) |
Maximum Unpadded Size. More... | |
Functions | |
uint32_t | lzma_index_padding_size (const lzma_index *i) |
void | lzma_index_prealloc (lzma_index *i, lzma_vli records) |
static lzma_vli | vli_ceil4 (lzma_vli vli) |
Round the variable-length integer to the next multiple of four. More... | |
static lzma_vli | index_size_unpadded (lzma_vli count, lzma_vli index_list_size) |
Calculate the size of the Index field excluding Index Padding. More... | |
static lzma_vli | index_size (lzma_vli count, lzma_vli index_list_size) |
Calculate the size of the Index field including Index Padding. More... | |
static lzma_vli | index_stream_size (lzma_vli blocks_size, lzma_vli count, lzma_vli index_list_size) |
Calculate the total size of the Stream. More... | |
Handling of Index.
Definition in file index.h.
#define UNPADDED_SIZE_MAX (LZMA_VLI_MAX & ~LZMA_VLI_C(3)) |
#define UNPADDED_SIZE_MIN LZMA_VLI_C(5) |
Calculate the size of the Index field including Index Padding.
Definition at line 57 of file index.h.
References count, index_size_unpadded(), and vli_ceil4().
Referenced by index_file_size(), index_stream_size(), iter_set_info(), LZMA_API(), parse_indexes(), read_image_metadata_tilde_header(), and test_code().
Calculate the size of the Index field excluding Index Padding.
Definition at line 48 of file index.h.
References count.
Referenced by index_size(), and lzma_index_padding_size().
|
inlinestatic |
Calculate the total size of the Stream.
Definition at line 65 of file index.h.
References count, index_size(), and LZMA_STREAM_HEADER_SIZE.
Referenced by LZMA_API().
uint32_t lzma_index_padding_size | ( | const lzma_index * | i | ) |
Get the size of the Index Padding field. This is needed by Index encoder and decoder, but applications should have no use for this.
Definition at line 593 of file index.c.
References i, lzma_index_s::index_list_size, index_size_unpadded(), LZMA_VLI_C, and lzma_index_s::record_count.
Referenced by index_decode(), and index_encode().
void lzma_index_prealloc | ( | lzma_index * | i, |
lzma_vli | records | ||
) |
Set for how many Records to allocate memory the next time lzma_index_append() needs to allocate space for a new Record. This is used only by the Index decoder.
Definition at line 431 of file index.c.
References i, lzma_index_s::prealloc, and PREALLOC_MAX.
Referenced by index_decode().
Round the variable-length integer to the next multiple of four.
Definition at line 39 of file index.h.
References assert(), LZMA_VLI_C, and LZMA_VLI_MAX.
Referenced by hash_append(), index_file_size(), index_size(), iter_set_info(), and LZMA_API().