Data Fields | |
index_tree_node | node |
Every Record group is part of index_stream.groups tree. | |
lzma_vli | number_base |
Number of Blocks in this Stream before this group. | |
size_t | allocated |
Number of Records that can be put in records[]. | |
size_t | last |
Index of the last Record in use. | |
index_record | records [] |
Every Record group is part of index_stream.groups tree.
Referenced by index_dup_stream(), lzma_index_append(), and lzma_index_iter_next().
Number of Blocks in this Stream before this group.
Referenced by index_dup_stream(), and lzma_index_append().
size_t index_group::allocated |
Number of Records that can be put in records[].
Referenced by index_dup_stream(), and lzma_index_append().
size_t index_group::last |
Index of the last Record in use.
Referenced by index_dup_stream(), lzma_index_append(), lzma_index_file_size(), and lzma_index_iter_locate().
The sizes in this array are stored as cumulative sums relative to the beginning of the Stream. This makes it possible to use binary search in lzma_index_locate().
Note that the cumulative summing is done specially for unpadded_sum: The previous value is rounded up to the next multiple of four before adding the Unpadded Size of the new Block. The total encoded size of the Blocks in the Stream is records[last].unpadded_sum in the last Record group of the Stream.
For example, if the Unpadded Sizes are 39, 57, and 81, the stored values are 39, 97 (40 + 57), and 181 (100 + 181). The total encoded size of these Blocks is 184.
This is a flexible array, because it makes easy to optimize memory usage in case someone concatenates many Streams that have only one or few Blocks.
Referenced by index_dup_stream(), lzma_index_append(), lzma_index_file_size(), lzma_index_iter_locate(), and lzma_index_iter_next().