org.elasticsearch.util.io.compression.lzf
Class LZFDecoder

java.lang.Object
  extended by org.elasticsearch.util.io.compression.lzf.LZFDecoder

public class LZFDecoder
extends java.lang.Object

Decoder that handles decoding of sequence of encoded LZF chunks, combining them into a single contiguous result byte array

Code adapted from H2 project (http://www.h2database.com) Java LZF implementation by Thomas (which itself was inspired by original C code by Marc A Lehmann)


Method Summary
static byte[] decode(byte[] data, int length)
          Method for decompressing whole input data, which encoded in LZF block structure (compatible with lzf command line utility), and can consist of any number of blocks
static void decompressChunk(byte[] in, int inPos, byte[] out, int outPos, int outEnd)
          Main decode method for individual chunks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

decode

public static byte[] decode(byte[] data,
                            int length)
                     throws java.io.IOException
Method for decompressing whole input data, which encoded in LZF block structure (compatible with lzf command line utility), and can consist of any number of blocks

Throws:
java.io.IOException

decompressChunk

public static void decompressChunk(byte[] in,
                                   int inPos,
                                   byte[] out,
                                   int outPos,
                                   int outEnd)
                            throws java.io.IOException
Main decode method for individual chunks.

Throws:
java.io.IOException