org.apache.commons.compress.compressors.lz4

## Class FramedLZ4CompressorOutputStream.Parameters

- java.lang.Object
- - org.apache.commons.compress.compressors.lz4.FramedLZ4CompressorOutputStream.Parameters

- Enclosing class:
    FramedLZ4CompressorOutputStream

      public static class FramedLZ4CompressorOutputStream.Parameters
      extends Object

  Parameters of the LZ4 frame format.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static FramedLZ4CompressorOutputStream.Parameters` | `DEFAULT` The default parameters of 4M block size, enabled content checksum, disabled block checksums and independent blocks.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Parameters(FramedLZ4CompressorOutputStream.BlockSize blockSize)` 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(FramedLZ4CompressorOutputStream.BlockSize blockSize, boolean withContentChecksum, boolean withBlockChecksum, boolean withBlockDependency)` Sets up custom parameters for the LZ4 stream.
    `Parameters(FramedLZ4CompressorOutputStream.BlockSize blockSize, boolean withContentChecksum, boolean withBlockChecksum, boolean withBlockDependency, Parameters lz77params)` Sets up custom parameters for the LZ4 stream.
    `Parameters(FramedLZ4CompressorOutputStream.BlockSize blockSize, Parameters 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.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT

          public static final FramedLZ4CompressorOutputStream.Parameters DEFAULT

      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.

  - ### Constructor Detail

    - #### Parameters

          public Parameters(FramedLZ4CompressorOutputStream.BlockSize blockSize)

      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:
        `blockSize` - the size of a single block.

    - #### Parameters

          public Parameters(FramedLZ4CompressorOutputStream.BlockSize blockSize,
                            Parameters 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.
      Parameters:
        `blockSize` - the size of a single block.
        `lz77params` - parameters used to fine-tune compression, in particular to balance compression ratio vs compression speed.

    - #### Parameters

          public Parameters(FramedLZ4CompressorOutputStream.BlockSize blockSize,
                            boolean withContentChecksum,
                            boolean withBlockChecksum,
                            boolean withBlockDependency)

      Sets up custom parameters for the LZ4 stream.
      Parameters:
        `blockSize` - the size of a single block.
        `withContentChecksum` - whether to write a content checksum
        `withBlockChecksum` - whether to write a block checksum. Note that block checksums are not supported by the lz4 command line utility
        `withBlockDependency` - 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.

    - #### Parameters

          public Parameters(FramedLZ4CompressorOutputStream.BlockSize blockSize,
                            boolean withContentChecksum,
                            boolean withBlockChecksum,
                            boolean withBlockDependency,
                            Parameters lz77params)

      Sets up custom parameters for the LZ4 stream.
      Parameters:
        `blockSize` - the size of a single block.
        `withContentChecksum` - whether to write a content checksum
        `withBlockChecksum` - whether to write a block checksum. Note that block checksums are not supported by the lz4 command line utility
        `withBlockDependency` - 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.
        `lz77params` - parameters used to fine-tune compression, in particular to balance compression ratio vs compression speed.

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.