Class ZstdCompressorOutputStream

java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.apache.commons.compress.compressors.CompressorOutputStream<com.github.luben.zstd.ZstdOutputStream>
org.apache.commons.compress.compressors.zstandard.ZstdCompressorOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class ZstdCompressorOutputStream extends CompressorOutputStream<com.github.luben.zstd.ZstdOutputStream>
CompressorOutputStream implementation to create Zstandard encoded stream. Library relies on Zstandard JNI
Since:
1.16
  • Constructor Details

    • ZstdCompressorOutputStream

      Wraps the given stream into a zstd-jni ZstdOutputStream using the default values for level, closeFrameOnFlush and useChecksum.
      Parameters:
      outStream - the stream to write to
      Throws:
      IOException - if zstd-jni does
    • ZstdCompressorOutputStream

      public ZstdCompressorOutputStream(OutputStream outStream, int level) throws IOException
      Wraps the given stream into a zstd-jni ZstdOutputStream using the default values for closeFrameOnFlush and useChecksum.
      Parameters:
      outStream - the stream to write to
      level - value for zstd-jni's level argument
      Throws:
      IOException - if zstd-jni does
      Since:
      1.18
    • ZstdCompressorOutputStream

      public ZstdCompressorOutputStream(OutputStream outStream, int level, boolean closeFrameOnFlush) throws IOException
      Wraps the given stream into a zstd-jni ZstdOutputStream using the default value for useChecksum.
      Parameters:
      outStream - the stream to write to
      level - value for zstd-jni's level argument
      closeFrameOnFlush - value for zstd-jni's closeFrameOnFlush argument
      Throws:
      IOException - if zstd-jni does
      Since:
      1.18
    • ZstdCompressorOutputStream

      public ZstdCompressorOutputStream(OutputStream outStream, int level, boolean closeFrameOnFlush, boolean useChecksum) throws IOException
      Wraps the given stream into a zstd-jni ZstdOutputStream.
      Parameters:
      outStream - the stream to write to
      level - value for zstd-jni's level argument
      closeFrameOnFlush - value for zstd-jni's closeFrameOnFlush argument
      useChecksum - value for zstd-jni's useChecksum argument
      Throws:
      IOException - if zstd-jni does
      Since:
      1.18
  • Method Details