Functions

/tmp/buildd/xz-utils-5.0.0/src/liblzma/common/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.

Detailed Description

Calculates the encoded size of a variable-length integer.


Function Documentation

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_BYTES_MAX, and LZMA_VLI_MAX.

Referenced by hash_append(), lzma_block_header_size(), lzma_filter_flags_size(), and lzma_index_append().