VLI Class Reference

Variable Length Integer - smaller integers are stored in fewer bits. More...

List of all members.


struct  Type
 Data type for storing VLI. More...

Public Member Functions

 VLI (int possibilities, int exponentAddition)
 Only initializes the settings.
int bitsForLevel (int level) const
 Gets the number of bits needed to encode the residues of numbers at a given level.
Type toVLI (int value) const
 Converts from signed integer to VLI.
int fromVLI (int level, int data) const
 Converts from VLI to signed integer.

Public Attributes

const int expAdd
 2^expAdd is the number of possibilities on the first level (level 0)
const int maxLevel
 The highest possible level (in this settings).
const int maxLevel_Bits
 The number of bits needed to encode residues in the highest level.

Private Member Functions

int getBase (int level) const
 Returns the lowest number of a level (works with non-negative integers only).

Static Private Member Functions

static int toPositive (int value)
 Simple routine converting from all integers to non-negative integers (interleaving).
static int fromPositive (int value)
 Simple converting routine, opposite to toPositive.
static int getLevel (int posValue, int expAdd)
 Returns the level of a non-negative integer depending on the setting of expAdd.

Detailed Description

Variable Length Integer - smaller integers are stored in fewer bits.

Definition at line 6 of file vliCodec.cpp.

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

Generated on Thu Aug 6 22:33:15 2009 for Fractal Image Compressor by  doxygen 1.5.8