manpagez: man pages & more
info lzip
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.3 The range decoder

The LZMA stream is consumed one byte at a time by the range decoder. (See ‘normalize’ in the source). Every byte consumed produces a variable number of decoded bits, depending on how well these bits agree with their context. (See ‘decode_bit’ in the source).

The range decoder state consists of two unsigned 32-bit variables, range (representing the most significant part of the range size not yet decoded), and code (representing the current point within range). range is initialized to (2^32 - 1), and code is initialized to 0.

The range encoder produces a first 0 byte that must be ignored by the range decoder. This is done by shifting 5 bytes in the initialization of code instead of 4. (See the ‘Range_decoder’ constructor in the source).



This document was generated on October 10, 2013 using texi2html 5.0.

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.