Top Description Fields Constructors Methods
com.ning.compress.lzf.impl

public abstract Class UnsafeChunkEncoder

extends ChunkEncoder
Class Inheritance
Known Direct Subclasses
com.ning.compress.lzf.impl.UnsafeChunkEncoderBE, com.ning.compress.lzf.impl.UnsafeChunkEncoderLE
Annotations
@SuppressWarnings:restriction
Imports
com.ning.compress.BufferRecycler, java.lang.reflect.Field, sun.misc.Unsafe, com.ning.compress.lzf.ChunkEncoder, .LZFChunk

ChunkEncoder implementation that handles actual encoding of individual chunks, using Sun's sun.misc.Unsafe functionality, which gives nice extra boost for speed.
Author
Tatu Saloranta ([email protected])

Field Summary

Modifier and TypeField and Description
protected static final long
protected static final long
protected static final Unsafe
Inherited from com.ning.compress.lzf.ChunkEncoder:
_encodeBuffer_hashModulo_hashTable_headerBuffer_recyclerMAX_HASH_SIZEMAX_OFFMAX_REFMIN_BLOCK_TO_COMPRESSMIN_HASH_SIZETAIL_LENGTH

Constructor Summary

AccessConstructor and Description
public
UnsafeChunkEncoder(int totalLength)

public
UnsafeChunkEncoder(int totalLength, boolean bogus)

public
UnsafeChunkEncoder(int totalLength, BufferRecycler bufferRecycler)

public
UnsafeChunkEncoder(int totalLength, BufferRecycler bufferRecycler, boolean bogus)

Method Summary

Modifier and TypeMethod and Description
protected static final int
_copyFullLiterals(byte[] in, int inPos, byte[] out, int outPos)

protected static final int
_copyLongLiterals(byte[] in, int inPos, byte[] out, int outPos, int literals)

protected static final int
_copyPartialLiterals(byte[] in, int inPos, byte[] out, int outPos, int literals)

protected static final int
_findTailMatchLength(final byte[] in, int ptr1, int ptr2, final int maxPtr1)

protected static final int
_handleTail(byte[] in, int inPos, int inEnd, byte[] out, int outPos, int literals)

Inherited from com.ning.compress.lzf.ChunkEncoder:
appendEncodedChunkappendEncodedIfCompressescloseencodeAndWriteChunkencodeAndWriteChunkIfCompressesencodeChunkencodeChunkIfCompressesgetBufferRecyclerhashtryCompress

Field Detail

BYTE_ARRAY_OFFSETback to summary
protected static final long BYTE_ARRAY_OFFSET
BYTE_ARRAY_OFFSET_PLUS2back to summary
protected static final long BYTE_ARRAY_OFFSET_PLUS2
unsafeback to summary
protected static final Unsafe unsafe

Constructor Detail

UnsafeChunkEncoderback to summary
public UnsafeChunkEncoder(int totalLength)
UnsafeChunkEncoderback to summary
public UnsafeChunkEncoder(int totalLength, boolean bogus)
UnsafeChunkEncoderback to summary
public UnsafeChunkEncoder(int totalLength, BufferRecycler bufferRecycler)
UnsafeChunkEncoderback to summary
public UnsafeChunkEncoder(int totalLength, BufferRecycler bufferRecycler, boolean bogus)

Method Detail

_copyFullLiteralsback to summary
protected static final int _copyFullLiterals(byte[] in, int inPos, byte[] out, int outPos)
_copyLongLiteralsback to summary
protected static final int _copyLongLiterals(byte[] in, int inPos, byte[] out, int outPos, int literals)
_copyPartialLiteralsback to summary
protected static final int _copyPartialLiterals(byte[] in, int inPos, byte[] out, int outPos, int literals)
_findTailMatchLengthback to summary
protected static final int _findTailMatchLength(final byte[] in, int ptr1, int ptr2, final int maxPtr1)
_handleTailback to summary
protected static final int _handleTail(byte[] in, int inPos, int inEnd, byte[] out, int outPos, int literals)