index_group Struct Reference

## Data Fields

index_tree_node | node
| Every Record group is part of index_stream.groups tree. More...
lzma_vli | number_base
| Number of Blocks in this Stream before this group. More...
size_t | allocated
| Number of Records that can be put in records[]. More...
size_t | last
| Index of the last Record in use. More...
index_record | records []

## Field Documentation

## node

index_tree_node index_group::node

Every Record group is part of index_stream.groups tree.

## number_base

lzma_vli index_group::number_base

Number of Blocks in this Stream before this group.

## allocated

size_t index_group::allocated

Number of Records that can be put in records[].

## last

size_t index_group::last

Index of the last Record in use.

## records

index_record index_group::records[]

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.

The documentation for this struct was generated from the following file:

- liblzma/common/index.c