vli_size.c File Reference

Calculates the encoded size of a variable-length integer. More...

`#include "common.h"`

## Functions

uint32_t | lzma_vli_size (lzma_vli vli)
| Get the number of bytes required to encode a VLI. More...

## Detailed Description

Calculates the encoded size of a variable-length integer.

## Function Documentation

## lzma_vli_size()

uint32_t lzma_vli_size | ( | lzma_vli | vli | ) |

Get the number of bytes required to encode a VLI.

Returns
  Number of bytes on success (1-9). If vli isn't valid, zero is returned.

References LZMA_VLI_MAX.

Referenced by index_size_unpadded(), lzma_block_header_size(), and lzma_filter_flags_size().