src/liblzma/common/index.c File Reference

Handling of Index. More...

#include "index.h"

Data Structures

struct  lzma_index_group_s
struct  lzma_index_s

Defines

#define INDEX_GROUP_SIZE   256
 Number of Records to allocate at once in the unrolled list.

Typedefs

typedef struct lzma_index_group_s lzma_index_group

Functions

 LZMA_API (lzma_vli)
 Calculate rough memory usage of easy encoder.
static void free_index_list (lzma_index *i, lzma_allocator *allocator)
 LZMA_API (lzma_index *)
 LZMA_API (void)
 Free memory allocated for the coder data structures.
uint32_t lzma_index_padding_size (const lzma_index *i)
static lzma_ret index_append_real (lzma_index *i, lzma_allocator *allocator, lzma_vli unpadded_size, lzma_vli uncompressed_size, bool is_padding)
 LZMA_API (lzma_ret)
static bool init_current (lzma_index *i)
 Initialize i->current to point to the first Record.
static void previous_group (lzma_index *i)
 Go backward to the previous group.
static void next_group (lzma_index *i)
 Go forward to the next group.
static void set_info (const lzma_index *i, lzma_index_record *info)
 Set *info from i->current.
 LZMA_API (lzma_bool)

Detailed Description

Handling of Index.


Define Documentation

#define INDEX_GROUP_SIZE   256

Number of Records to allocate at once in the unrolled list.

Referenced by index_append_real().


Function Documentation

LZMA_API ( uint64_t   ) 

Calculate rough memory usage of easy encoder.

Calculate memory usage for Index with given number of Records.

Calculate rough decoder memory usage of a preset.

This function is a wrapper for lzma_raw_encoder_memusage().

Parameters:
preset Compression preset (level and possible flags)

This function is a wrapper for lzma_raw_decoder_memusage().

Parameters:
preset Compression preset (level and possible flags)
LZMA_API ( void   ) 

Free memory allocated for the coder data structures.

Rewind the Index.

Parameters:
strm Pointer to lzma_stream that is at least initialized with LZMA_STREAM_INIT.

After lzma_end(strm), strm->internal is guaranteed to be NULL. No other members of the lzma_stream structure are touched.

Note:
zlib indicates an error if application end()s unfinished stream structure. liblzma doesn't do this, and assumes that application knows what it is doing.

Rewind the Index so that next call to lzma_index_read() will return the first Record.

Free memory allocated for the coder data structures.

Rewind the Index.

If i is NULL, this does nothing.

Rewind the Index so that next call to lzma_index_read() will return the first Record.

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.

References lzma_index_s::count, lzma_index_s::index_list_size, and LZMA_VLI_C.

static lzma_ret index_append_real ( lzma_index i,
lzma_allocator allocator,
lzma_vli  unpadded_size,
lzma_vli  uncompressed_size,
bool  is_padding 
) [static]
static bool init_current ( lzma_index i  )  [static]
static void previous_group ( lzma_index i  )  [static]
static void next_group ( lzma_index i  )  [static]
static void set_info ( const lzma_index i,
lzma_index_record info 
) [static]

Generated on Tue Oct 6 14:02:22 2009 for XZ Utils by  doxygen 1.6.1