| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public byte[] | |
| private static int | |
| public byte[] | Returns: the uncompressed datathe byte array with the compressed data in)Expands the compressed data. |
| public static void | expand(byte[]
compressed data in, byte[] uncompressed result out, int the offset at the output array outPos)INTERNAL |
| private byte[] | |
| private static int | Returns: index of the specified algorithmto translate into index algorithm)INTERNAL |
| private static Compressor | |
| private static Compressor | |
| public static CompressTool | |
| public static int | Returns: the number of bytes needed (0-5)the value x)Get a variable size integer length using Rice coding. |
| public static int | Returns: the integerthe buffer buff, int the position pos)Read a variable size integer using Rice coding. |
| public static InputStream | Returns: in stream or null if there is no such entrystream in, String to be used compressionAlgorithm, String in a zip file entryName)INTERNAL |
| public static OutputStream | Returns: compressed streamstream out, String to be used compressionAlgorithm, String in a zip file entryName)INTERNAL |
| public static int | Returns: the number of bytes written (0-5)the buffer buff, int the position pos, int the value x)Write a variable size integer using Rice coding. |
| buffer | back to summary |
|---|---|
| private byte[] buffer | |
| MAX_BUFFER_SIZE | back to summary |
|---|---|
| private static final int MAX_BUFFER_SIZE | |
| CompressTool | back to summary |
|---|---|
| private CompressTool() | |
| compress | back to summary |
|---|---|
| public byte[] compress(byte[] in, String algorithm) Compressed the data using the specified algorithm. If no algorithm is supplied, LZF is used
| |
| compress | back to summary |
|---|---|
| private static int compress(byte[] in, int len, Compressor compress, byte[] out) | |
| expand | back to summary |
|---|---|
| public byte[] expand(byte[] in) Expands the compressed data.
| |
| expand | back to summary |
|---|---|
| public static void expand(byte[] in, byte[] out, int outPos) INTERNAL
| |
| getBuffer | back to summary |
|---|---|
| private byte[] getBuffer(int min) | |
| getCompressAlgorithm | back to summary |
|---|---|
| private static int getCompressAlgorithm(String algorithm) INTERNAL
| |
| getCompressor | back to summary |
|---|---|
| private static Compressor getCompressor(String algorithm) | |
| getCompressor | back to summary |
|---|---|
| private static Compressor getCompressor(int algorithm) | |
| getInstance | back to summary |
|---|---|
| public static CompressTool getInstance() Get a new instance. Each instance uses a separate buffer, so multiple instances can be used concurrently. However each instance alone is not multithreading safe.
| |
| getVariableIntLength | back to summary |
|---|---|
| public static int getVariableIntLength(int x) Get a variable size integer length using Rice coding. Negative values need 5 bytes.
| |
| readVariableInt | back to summary |
|---|---|
| public static int readVariableInt(byte[] buff, int pos) Read a variable size integer using Rice coding.
| |
| wrapInputStream | back to summary |
|---|---|
| public static InputStream wrapInputStream(InputStream in, String compressionAlgorithm, String entryName) INTERNAL
| |
| wrapOutputStream | back to summary |
|---|---|
| public static OutputStream wrapOutputStream(OutputStream out, String compressionAlgorithm, String entryName) INTERNAL
| |
| writeVariableInt | back to summary |
|---|---|
| public static int writeVariableInt(byte[] buff, int pos, int x) Write a variable size integer using Rice coding. Negative values need 5 bytes.
| |