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

public final Class UnsafeChunkEncoderBE

extends UnsafeChunkEncoder
Class Inheritance
Annotations
@SuppressWarnings:restriction
Imports
com.ning.compress.BufferRecycler, com.ning.compress.lzf.LZFChunk

Implementation to use on Big-Endian architectures.

Field Summary

Inherited from com.ning.compress.lzf.impl.UnsafeChunkEncoder:
BYTE_ARRAY_OFFSETBYTE_ARRAY_OFFSET_PLUS2unsafe

Constructor Summary

AccessConstructor and Description
public
UnsafeChunkEncoderBE(int totalLength)

public
UnsafeChunkEncoderBE(int totalLength, boolean bogus)

public
UnsafeChunkEncoderBE(int totalLength, BufferRecycler bufferRecycler)

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

Method Summary

Modifier and TypeMethod and Description
private static final int
_findLongMatchLength(final byte[] in, int ptr1, int ptr2, final int maxPtr1)

private static final int
_findMatchLength(final byte[] in, int ptr1, int ptr2, final int maxPtr1)

private static final int
_getInt(final byte[] in, final int inPos)

private static final int
_leadingBytes(int i1, int i2)

private static final int
_leadingBytes(long l1, long l2)

protected int
tryCompress(byte[] in, int inPos, int inEnd, byte[] out, int outPos)

Implements abstract com.ning.compress.lzf.ChunkEncoder.tryCompress.

Main workhorse method that will try to compress given chunk, and return end position (offset to byte after last included byte).
Inherited from com.ning.compress.lzf.impl.UnsafeChunkEncoder:
_copyFullLiterals_copyLongLiterals_copyPartialLiterals_findTailMatchLength_handleTail

Constructor Detail

UnsafeChunkEncoderBEback to summary
public UnsafeChunkEncoderBE(int totalLength)
UnsafeChunkEncoderBEback to summary
public UnsafeChunkEncoderBE(int totalLength, boolean bogus)
UnsafeChunkEncoderBEback to summary
public UnsafeChunkEncoderBE(int totalLength, BufferRecycler bufferRecycler)
UnsafeChunkEncoderBEback to summary
public UnsafeChunkEncoderBE(int totalLength, BufferRecycler bufferRecycler, boolean bogus)

Method Detail

_findLongMatchLengthback to summary
private static final int _findLongMatchLength(final byte[] in, int ptr1, int ptr2, final int maxPtr1)
_findMatchLengthback to summary
private static final int _findMatchLength(final byte[] in, int ptr1, int ptr2, final int maxPtr1)
_getIntback to summary
private static final int _getInt(final byte[] in, final int inPos)
_leadingBytesback to summary
private static final int _leadingBytes(int i1, int i2)
_leadingBytesback to summary
private static final int _leadingBytes(long l1, long l2)
tryCompressback to summary
protected int tryCompress(byte[] in, int inPos, int inEnd, byte[] out, int outPos)

Implements abstract com.ning.compress.lzf.ChunkEncoder.tryCompress.

Doc from com.ning.compress.lzf.ChunkEncoder.tryCompress.

Main 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.

Returns:int

Output pointer after handling content, such that result - originalOutPost is the actual length of compressed chunk (without header)

Annotations
@Override