final class SnappyDecompressor
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static int |
MAX_INCREMENT_COPY_OVERFLOW |
private static short[] |
opLookupTable |
private static int[] |
wordmask |
Constructor and Description |
---|
SnappyDecompressor() |
Modifier and Type | Method and Description |
---|---|
private static void |
copyLiteral(byte[] input,
int ipIndex,
byte[] output,
int opIndex,
int length) |
private static int |
decompressAllTags(byte[] input,
int inputOffset,
int inputSize,
byte[] output,
int outputOffset) |
private static int[] |
decompressTagSlow(byte[] input,
int ipIndex,
byte[] output,
int outputLimit,
int outputOffset,
int opIndex)
This is a second copy of the inner loop of decompressTags used when near the end
of the input.
|
static int |
getUncompressedLength(byte[] compressed,
int compressedOffset) |
private static void |
incrementalCopy(byte[] src,
int srcIndex,
byte[] op,
int opIndex,
int length)
Copy "len" bytes from "src" to "op", one byte at a time.
|
private static void |
incrementalCopyFastPath(byte[] output,
int srcIndex,
int opIndex,
int length) |
private static int |
readTrailer(byte[] data,
int index,
int bytes) |
private static int[] |
readUncompressedLength(byte[] compressed,
int compressedOffset)
Reads the variable length integer encoded a the specified offset, and
returns this length with the number of bytes read.
|
static byte[] |
uncompress(byte[] compressed,
int compressedOffset,
int compressedSize) |
static int |
uncompress(byte[] compressed,
int compressedOffset,
int compressedSize,
byte[] uncompressed,
int uncompressedOffset) |
private static final int MAX_INCREMENT_COPY_OVERFLOW
private static final int[] wordmask
private static final short[] opLookupTable
public static int getUncompressedLength(byte[] compressed, int compressedOffset) throws CorruptionException
CorruptionException
public static byte[] uncompress(byte[] compressed, int compressedOffset, int compressedSize) throws CorruptionException
CorruptionException
public static int uncompress(byte[] compressed, int compressedOffset, int compressedSize, byte[] uncompressed, int uncompressedOffset) throws CorruptionException
CorruptionException
private static int decompressAllTags(byte[] input, int inputOffset, int inputSize, byte[] output, int outputOffset) throws CorruptionException
CorruptionException
private static int[] decompressTagSlow(byte[] input, int ipIndex, byte[] output, int outputLimit, int outputOffset, int opIndex) throws CorruptionException
CorruptionException
private static int readTrailer(byte[] data, int index, int bytes)
private static void copyLiteral(byte[] input, int ipIndex, byte[] output, int opIndex, int length) throws CorruptionException
CorruptionException
private static void incrementalCopy(byte[] src, int srcIndex, byte[] op, int opIndex, int length)
private static void incrementalCopyFastPath(byte[] output, int srcIndex, int opIndex, int length)
private static int[] readUncompressedLength(byte[] compressed, int compressedOffset) throws CorruptionException
CorruptionException