com.ning.compress.lzf.impl
Class VanillaChunkDecoder

java.lang.Object
  extended by com.ning.compress.lzf.ChunkDecoder
      extended by com.ning.compress.lzf.impl.VanillaChunkDecoder

public class VanillaChunkDecoder
extends ChunkDecoder

Safe ChunkDecoder implementation that can be used on any platform.


Field Summary
 
Fields inherited from class com.ning.compress.lzf.ChunkDecoder
BYTE_NULL, HEADER_BYTES
 
Constructor Summary
VanillaChunkDecoder()
           
 
Method Summary
protected static void copyUpTo32WithSwitch(byte[] in, int inPos, byte[] out, int outPos, int lengthMinusOne)
           
 void decodeChunk(byte[] in, int inPos, byte[] out, int outPos, int outEnd)
          Main decode method for individual chunks.
 int decodeChunk(InputStream is, byte[] inputBuffer, byte[] outputBuffer)
          Main decode from a stream.
 
Methods inherited from class com.ning.compress.lzf.ChunkDecoder
calculateUncompressedSize, decode, decode, decode, decode, readFully, readHeader, uint16
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VanillaChunkDecoder

public VanillaChunkDecoder()
Method Detail

decodeChunk

public final int decodeChunk(InputStream is,
                             byte[] inputBuffer,
                             byte[] outputBuffer)
                      throws IOException
Description copied from class: ChunkDecoder
Main decode from a stream. Decompressed bytes are placed in the outputBuffer, inputBuffer is a "scratch-area".

Specified by:
decodeChunk in class ChunkDecoder
Parameters:
is - An input stream of LZF compressed bytes
inputBuffer - A byte array used as a scratch area.
outputBuffer - A byte array in which the result is returned
Returns:
The number of bytes placed in the outputBuffer.
Throws:
IOException

decodeChunk

public final void decodeChunk(byte[] in,
                              int inPos,
                              byte[] out,
                              int outPos,
                              int outEnd)
                       throws IOException
Description copied from class: ChunkDecoder
Main decode method for individual chunks.

Specified by:
decodeChunk in class ChunkDecoder
Throws:
IOException

copyUpTo32WithSwitch

protected static final void copyUpTo32WithSwitch(byte[] in,
                                                 int inPos,
                                                 byte[] out,
                                                 int outPos,
                                                 int lengthMinusOne)


Copyright © 2012. All Rights Reserved.