Logo Search packages:      
Sourcecode: scummvm version File versions  Download package

uint8 * Agi::LZWDecoder::decodeString ( uint8 *  buffer,
uint32  code 
) [private]

Return the string that the code taken from the input buffer represents. The string is returned as a stack, i.e. the characters are in reverse order.

Definition at line 103 of file lzw.cpp.

Referenced by lzwExpand().

      uint32 i;

      for (i = 0; code > 255;) {
            *buffer++ = appendCharacter[code];
            code = prefixCode[code];
            if (i++ >= 4000) {
                  error("lzw: error in code expansion.");
      *buffer = code;

      return buffer;

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index