Based on the "spec" in the version "1.5.1 (31/03/2015)"
| Modifier and Type | Class and Description |
|---|---|
| public static enum | FramedLZ4CompressorOutputStream.BlockSize
The block sizes supported by the format. |
| public static class | FramedLZ4CompressorOutputStream.Parameters
Parameters of the LZ4 frame format. |
| Modifier and Type | Field and Description |
|---|---|
| private final byte[] | |
| private final byte[] | |
| private final XXHash32 | |
| private int | |
| private final XXHash32 | |
| private int | |
| private static final byte[] | |
| private boolean | |
| private final byte[] | |
| private final OutputStream | |
| private final FramedLZ4CompressorOutputStream. |
| Access | Constructor and Description |
|---|---|
| public | FramedLZ4CompressorOutputStream(final OutputStream
the OutputStream to which to write the compressed data out)Constructs a new output stream that compresses data using the LZ4 frame format using the default block size of 4MB. |
| public | FramedLZ4CompressorOutputStream(final OutputStream
the OutputStream to which to write the compressed data out, final FramedLZ4CompressorOutputStream.the parameters to use paramsConstructs a new output stream that compresses data using the LZ4 frame format using the given block size. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public void | close()
Overrides java. Implements java. |
| public void | finish()
Compresses all blockDataRemaining data and writes it to the stream, doesn't close the underlying stream. |
| private void | |
| public void | write(final byte[]
the data. data, int the start offset in the data. off, int the number of bytes to write. len)Overrides java. len bytes from the specified byte array
starting at offset off to this output stream.
|
| public void | write(final int
the b)byte.Implements abstract java. |
| private void | |
| private void |
| blockData | back to summary |
|---|---|
| private final byte[] blockData | |
| blockDependencyBuffer | back to summary |
|---|---|
| private final byte[] blockDependencyBuffer | |
| blockHash | back to summary |
|---|---|
| private final XXHash32 blockHash | |
| collectedBlockDependencyBytes | back to summary |
|---|---|
| private int collectedBlockDependencyBytes | |
| contentHash | back to summary |
|---|---|
| private final XXHash32 contentHash | |
| currentIndex | back to summary |
|---|---|
| private int currentIndex | |
| END_MARK | back to summary |
|---|---|
| private static final byte[] END_MARK | |
| finished | back to summary |
|---|---|
| private boolean finished | |
| oneByte | back to summary |
|---|---|
| private final byte[] oneByte | |
| out | back to summary |
|---|---|
| private final OutputStream out | |
| params | back to summary |
|---|---|
| private final FramedLZ4CompressorOutputStream. | |
| FramedLZ4CompressorOutputStream | back to summary |
|---|---|
| public FramedLZ4CompressorOutputStream(final OutputStream out) throws IOException Constructs a new output stream that compresses data using the LZ4 frame format using the default block size of 4MB.
| |
| FramedLZ4CompressorOutputStream | back to summary |
|---|---|
| public FramedLZ4CompressorOutputStream(final OutputStream out, final FramedLZ4CompressorOutputStream. Constructs a new output stream that compresses data using the LZ4 frame format using the given block size.
| |
| appendToBlockDependencyBuffer | back to summary |
|---|---|
| private void appendToBlockDependencyBuffer(final byte[] b, final int off, int len) | |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Doc from java. Closes this output stream and releases any system resources
associated with this stream. The general contract of
| |
| finish | back to summary |
|---|---|
| public void finish() throws IOException Compresses all blockDataRemaining data and writes it to the stream, doesn't close the underlying stream.
| |
| flushBlock | back to summary |
|---|---|
| private void flushBlock() throws IOException | |
| write | back to summary |
|---|---|
| public void write(final byte[] data, int off, int len) throws IOException Overrides java. Doc from java. Writes
If
If
| |
| write | back to summary |
|---|---|
| public void write(final int b) throws IOException Implements abstract java. Doc from java. Writes the specified byte to this output stream. The general
contract for
| |
| writeFrameDescriptor | back to summary |
|---|---|
| private void writeFrameDescriptor() throws IOException | |
| writeTrailer | back to summary |
|---|---|
| private void writeTrailer() throws IOException | |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| public static final FramedLZ4CompressorOutputStream. | K256
Block size of 256K |
| public static final FramedLZ4CompressorOutputStream. | K64
Block size of 64K |
| public static final FramedLZ4CompressorOutputStream. | M1
Block size of 1M |
| public static final FramedLZ4CompressorOutputStream. | M4
Block size of 4M |
| private final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv int | |
| pack-priv int | |
| public static FramedLZ4CompressorOutputStream. | |
| public static FramedLZ4CompressorOutputStream. |
| index | back to summary |
|---|---|
| private final int index | |
| K256 | back to summary |
|---|---|
| public static final FramedLZ4CompressorOutputStream. Block size of 256K | |
| K64 | back to summary |
|---|---|
| public static final FramedLZ4CompressorOutputStream. Block size of 64K | |
| M1 | back to summary |
|---|---|
| public static final FramedLZ4CompressorOutputStream. Block size of 1M | |
| M4 | back to summary |
|---|---|
| public static final FramedLZ4CompressorOutputStream. Block size of 4M | |
| size | back to summary |
|---|---|
| private final int size | |
| BlockSize | back to summary |
|---|---|
| private BlockSize(final int size, final int index) | |
| getIndex | back to summary |
|---|---|
| pack-priv int getIndex() | |
| getSize | back to summary |
|---|---|
| pack-priv int getSize() | |
| valueOf | back to summary |
|---|---|
| public static FramedLZ4CompressorOutputStream. | |
| values | back to summary |
|---|---|
| public static FramedLZ4CompressorOutputStream. | |
| Modifier and Type | Field and Description |
|---|---|
| private final FramedLZ4CompressorOutputStream. | |
| public static final FramedLZ4CompressorOutputStream. | DEFAULT
The default parameters of 4M block size, enabled content checksum, disabled block checksums and independent blocks. |
| private final Parameters | |
| private final boolean | |
| private final boolean | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | Parameters(final FramedLZ4CompressorOutputStream.
the size of a single block. blockSizeSets up custom a custom block size for the LZ4 stream but otherwise uses the defaults of enabled content checksum, disabled block checksums and independent blocks. |
| public | Parameters(final FramedLZ4CompressorOutputStream.
the size of a single block. blockSize,whether to write a content checksum withContentChecksum, final boolean whether to write a block checksum. Note that block checksums are not supported by the lz4 command line utility withBlockChecksum, final boolean whether a block may depend on the content of a previous block. Enabling this may improve compression ratio but makes it
impossible to decompress the output in parallel. withBlockDependency)Sets up custom parameters for the LZ4 stream. |
| public | Parameters(final FramedLZ4CompressorOutputStream.
the size of a single block. blockSize,whether to write a content checksum withContentChecksum, final boolean whether to write a block checksum. Note that block checksums are not supported by the lz4 command line utility withBlockChecksum, final boolean whether a block may depend on the content of a previous block. Enabling this may improve compression ratio but makes it
impossible to decompress the output in parallel. withBlockDependency, final Parameters parameters used to fine-tune compression, in particular to balance compression ratio vs compression speed. lz77params)Sets up custom parameters for the LZ4 stream. |
| public | Parameters(final FramedLZ4CompressorOutputStream.
the size of a single block. blockSize,parameters used to fine-tune compression, in particular to balance compression ratio vs compression speed. lz77params)Sets up custom a custom block size for the LZ4 stream but otherwise uses the defaults of enabled content checksum, disabled block checksums and independent blocks. |
| Modifier and Type | Method and Description |
|---|---|
| public String |
| blockSize | back to summary |
|---|---|
| private final FramedLZ4CompressorOutputStream. | |
| DEFAULT | back to summary |
|---|---|
| public static final FramedLZ4CompressorOutputStream. The default parameters of 4M block size, enabled content checksum, disabled block checksums and independent blocks. This matches the defaults of the lz4 command line utility. | |
| lz77params | back to summary |
|---|---|
| private final Parameters lz77params | |
| withBlockChecksum | back to summary |
|---|---|
| private final boolean withBlockChecksum | |
| withBlockDependency | back to summary |
|---|---|
| private final boolean withBlockDependency | |
| withContentChecksum | back to summary |
|---|---|
| private final boolean withContentChecksum | |
| Parameters | back to summary |
|---|---|
| public Parameters(final FramedLZ4CompressorOutputStream. Sets up custom a custom block size for the LZ4 stream but otherwise uses the defaults of enabled content checksum, disabled block checksums and independent blocks.
| |
| Parameters | back to summary |
|---|---|
| public Parameters(final FramedLZ4CompressorOutputStream. Sets up custom parameters for the LZ4 stream.
| |
| Parameters | back to summary |
|---|---|
| public Parameters(final FramedLZ4CompressorOutputStream. Sets up custom parameters for the LZ4 stream.
| |
| Parameters | back to summary |
|---|---|
| public Parameters(final FramedLZ4CompressorOutputStream. Sets up custom a custom block size for the LZ4 stream but otherwise uses the defaults of enabled content checksum, disabled block checksums and independent blocks.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |