public abstract class UnsafeChunkEncoder extends ChunkEncoder
ChunkEncoder implementation that handles actual encoding of individual chunks,
using Sun's sun.misc.Unsafe functionality, which gives
nice extra boost for speed.| Modifier and Type | Field and Description |
|---|---|
protected static long |
BYTE_ARRAY_OFFSET |
protected static long |
BYTE_ARRAY_OFFSET_PLUS2 |
protected static sun.misc.Unsafe |
unsafe |
_encodeBuffer, _hashModulo, _hashTable, _headerBuffer, _recycler, MAX_HASH_SIZE, MAX_OFF, MAX_REF, MIN_BLOCK_TO_COMPRESS, MIN_HASH_SIZE, TAIL_LENGTH| Constructor and Description |
|---|
UnsafeChunkEncoder(int totalLength) |
UnsafeChunkEncoder(int totalLength,
boolean bogus) |
UnsafeChunkEncoder(int totalLength,
BufferRecycler bufferRecycler) |
UnsafeChunkEncoder(int totalLength,
BufferRecycler bufferRecycler,
boolean bogus) |
| Modifier and Type | Method and Description |
|---|---|
protected static int |
_copyFullLiterals(byte[] in,
int inPos,
byte[] out,
int outPos) |
protected static int |
_copyLongLiterals(byte[] in,
int inPos,
byte[] out,
int outPos,
int literals) |
protected static int |
_copyPartialLiterals(byte[] in,
int inPos,
byte[] out,
int outPos,
int literals) |
protected static int |
_findTailMatchLength(byte[] in,
int ptr1,
int ptr2,
int maxPtr1) |
protected static int |
_handleTail(byte[] in,
int inPos,
int inEnd,
byte[] out,
int outPos,
int literals) |
appendEncodedChunk, appendEncodedIfCompresses, close, encodeAndWriteChunk, encodeAndWriteChunkIfCompresses, encodeChunk, encodeChunkIfCompresses, getBufferRecycler, hash, tryCompressprotected static final sun.misc.Unsafe unsafe
protected static final long BYTE_ARRAY_OFFSET
protected static final long BYTE_ARRAY_OFFSET_PLUS2
public UnsafeChunkEncoder(int totalLength)
public UnsafeChunkEncoder(int totalLength,
boolean bogus)
public UnsafeChunkEncoder(int totalLength,
BufferRecycler bufferRecycler)
public UnsafeChunkEncoder(int totalLength,
BufferRecycler bufferRecycler,
boolean bogus)
protected static final int _copyPartialLiterals(byte[] in,
int inPos,
byte[] out,
int outPos,
int literals)
protected static final int _copyLongLiterals(byte[] in,
int inPos,
byte[] out,
int outPos,
int literals)
protected static final int _copyFullLiterals(byte[] in,
int inPos,
byte[] out,
int outPos)
protected static final int _handleTail(byte[] in,
int inPos,
int inEnd,
byte[] out,
int outPos,
int literals)
protected static final int _findTailMatchLength(byte[] in,
int ptr1,
int ptr2,
int maxPtr1)
Copyright © 2014. All Rights Reserved.