org.elasticsearch.util.io.compression.lzf
Class ChunkEncoder
java.lang.Object
org.elasticsearch.util.io.compression.lzf.ChunkEncoder
public class ChunkEncoder
- extends java.lang.Object
Class that handles actual encoding of individual chunks.
Resulting chunks can be compressed or non-compressed; compression
is only used if it actually reduces chunk size (including overhead
of additional header bytes)
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 |
LZFChunk |
encodeChunk(byte[] data,
int offset,
int len)
Method for compressing (or not) individual chunks |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChunkEncoder
public ChunkEncoder(int totalLength)
- Parameters:
totalLength
- Total encoded length; used for calculating size
of hash table to use
encodeChunk
public LZFChunk encodeChunk(byte[] data,
int offset,
int len)
- Method for compressing (or not) individual chunks