Class FramedLZ4CompressorOutputStream

java.lang.Object
java.io.OutputStream
org.apache.commons.compress.compressors.CompressorOutputStream
org.apache.commons.compress.compressors.lz4.FramedLZ4CompressorOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class FramedLZ4CompressorOutputStream extends CompressorOutputStream
CompressorOutputStream for the LZ4 frame format.

Based on the "spec" in the version "1.5.1 (31/03/2015)"

Since:
1.14
See Also:
  • Field Details

    • END_MARK

      private static final byte[] END_MARK
    • oneByte

      private final byte[] oneByte
    • blockData

      private final byte[] blockData
    • out

      private final OutputStream out
    • params

    • finished

      private boolean finished
    • currentIndex

      private int currentIndex
    • contentHash

      private final XXHash32 contentHash
    • blockHash

      private final XXHash32 blockHash
    • blockDependencyBuffer

      private final byte[] blockDependencyBuffer
    • collectedBlockDependencyBytes

      private int collectedBlockDependencyBytes
  • Constructor Details

    • FramedLZ4CompressorOutputStream

      public FramedLZ4CompressorOutputStream(OutputStream out) throws IOException
      Constructs a new output stream that compresses data using the LZ4 frame format using the default block size of 4MB.
      Parameters:
      out - the OutputStream to which to write the compressed data
      Throws:
      IOException - if writing the signature fails
    • FramedLZ4CompressorOutputStream

      public FramedLZ4CompressorOutputStream(OutputStream out, FramedLZ4CompressorOutputStream.Parameters params) throws IOException
      Constructs a new output stream that compresses data using the LZ4 frame format using the given block size.
      Parameters:
      out - the OutputStream to which to write the compressed data
      params - the parameters to use
      Throws:
      IOException - if writing the signature fails
  • Method Details