public final class LZ4 extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LZ4.FastCompressionHashTable
Simple lossy
HashTable that only stores the last ocurrence for
each hash on 2^14 bytes of memory. |
static class |
LZ4.HighCompressionHashTable
A higher-precision
HashTable. |
| Modifier and Type | Method and Description |
|---|---|
static void |
compress(byte[] bytes,
int off,
int len,
DataOutput out,
org.apache.lucene.util.compress.LZ4.HashTable ht)
Compress
bytes[off:off+len] into out using at most 16kB of
memory. |
static void |
compressWithDictionary(byte[] bytes,
int dictOff,
int dictLen,
int len,
DataOutput out,
org.apache.lucene.util.compress.LZ4.HashTable ht)
Compress
bytes[dictOff+dictLen:dictOff+dictLen+len] into
out using at most 16kB of memory. |
static int |
decompress(DataInput compressed,
int decompressedLen,
byte[] dest,
int dOff)
Decompress at least
decompressedLen bytes into
dest[dOff:]. |
public static int decompress(DataInput compressed, int decompressedLen, byte[] dest, int dOff) throws IOException
decompressedLen bytes into
dest[dOff:]. Please note that dest must be large
enough to be able to hold all decompressed data (meaning that you
need to know the total decompressed length).
If the given bytes were compressed using a preset dictionary then the same
dictionary must be provided in dest[dOff-dictLen:dOff].IOExceptionpublic static void compress(byte[] bytes,
int off,
int len,
DataOutput out,
org.apache.lucene.util.compress.LZ4.HashTable ht)
throws IOException
bytes[off:off+len] into out using at most 16kB of
memory. ht shouldn't be shared across threads but can safely be
reused.IOExceptionpublic static void compressWithDictionary(byte[] bytes,
int dictOff,
int dictLen,
int len,
DataOutput out,
org.apache.lucene.util.compress.LZ4.HashTable ht)
throws IOException
bytes[dictOff+dictLen:dictOff+dictLen+len] into
out using at most 16kB of memory.
bytes[dictOff:dictOff+dictLen] will be used as a dictionary.
dictLen must not be greater than 64kB, the maximum window size.
ht shouldn't be shared across threads but can safely be reused.IOExceptionCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.