Class UnsafeChunkEncoderLE
java.lang.Object
com.ning.compress.lzf.ChunkEncoder
com.ning.compress.lzf.impl.UnsafeChunkEncoder
com.ning.compress.lzf.impl.UnsafeChunkEncoderLE
- All Implemented Interfaces:
Closeable, AutoCloseable
Implementation to use on Little Endian architectures.
-
Field Summary
Fields inherited from class UnsafeChunkEncoder
BYTE_ARRAY_OFFSET, BYTE_ARRAY_OFFSET_PLUS2, unsafeFields inherited from class ChunkEncoder
_encodeBuffer, _hashModulo, _hashTable, _headerBuffer, _recycler, MAX_HASH_SIZE, MAX_OFF, MAX_REF, MIN_BLOCK_TO_COMPRESS, MIN_HASH_SIZE, TAIL_LENGTH -
Constructor Summary
ConstructorsConstructorDescriptionUnsafeChunkEncoderLE(int totalLength) UnsafeChunkEncoderLE(int totalLength, boolean bogus) UnsafeChunkEncoderLE(int totalLength, BufferRecycler bufferRecycler) UnsafeChunkEncoderLE(int totalLength, BufferRecycler bufferRecycler, boolean bogus) -
Method Summary
Modifier and TypeMethodDescriptionprotected inttryCompress(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).Methods inherited from class UnsafeChunkEncoder
_copyFullLiterals, _copyLongLiterals, _copyPartialLiterals, _findTailMatchLength, _handleTailMethods inherited from class ChunkEncoder
appendEncodedChunk, appendEncodedIfCompresses, close, encodeAndWriteChunk, encodeAndWriteChunkIfCompresses, encodeChunk, encodeChunkIfCompresses, getBufferRecycler, hash
-
Constructor Details
-
UnsafeChunkEncoderLE
public UnsafeChunkEncoderLE(int totalLength) -
UnsafeChunkEncoderLE
public UnsafeChunkEncoderLE(int totalLength, boolean bogus) -
UnsafeChunkEncoderLE
-
UnsafeChunkEncoderLE
-
-
Method Details
-
tryCompress
protected int tryCompress(byte[] in, int inPos, int inEnd, byte[] out, int outPos) Description copied from class:ChunkEncoderMain workhorse method that will try to compress given chunk, and return end position (offset to byte after last included byte). Result will be "raw" encoded contents without chunk header information: caller is responsible for prepending header, if it chooses to use encoded data; it may also choose to instead create an uncompressed chunk.- Specified by:
tryCompressin classChunkEncoder- Returns:
- Output pointer after handling content, such that
result - originalOutPostis the actual length of compressed chunk (without header)
-