public class VanillaChunkEncoder extends ChunkEncoder
_encodeBuffer, _hashModulo, _hashTable, _headerBuffer, _recycler, MAX_HASH_SIZE, MAX_OFF, MAX_REF, MIN_BLOCK_TO_COMPRESS, MIN_HASH_SIZE, TAIL_LENGTH
Modifier | Constructor and Description |
---|---|
|
VanillaChunkEncoder(int totalLength) |
protected |
VanillaChunkEncoder(int totalLength,
boolean bogus)
Alternate constructor used when we want to avoid allocation encoding
buffer, in cases where caller wants full control over allocations.
|
Modifier and Type | Method and Description |
---|---|
static VanillaChunkEncoder |
nonAllocatingEncoder(int totalLength) |
protected int |
tryCompress(byte[] in,
int inPos,
int inEnd,
byte[] out,
int outPos)
Main workhorse method that will try to compress given chunk, and return
end position (offset to byte after last included byte)
|
appendEncodedChunk, close, encodeAndWriteChunk, encodeChunk, hash
public VanillaChunkEncoder(int totalLength)
totalLength
- Total encoded length; used for calculating size
of hash table to useprotected VanillaChunkEncoder(int totalLength, boolean bogus)
public static VanillaChunkEncoder nonAllocatingEncoder(int totalLength)
protected int tryCompress(byte[] in, int inPos, int inEnd, byte[] out, int outPos)
tryCompress
in class ChunkEncoder
result - originalOutPost
is the actual length of compressed chunk (without header)Copyright © 2013. All rights reserved.