Class DeflaterFactory

java.lang.Object
htsjdk.samtools.util.zip.DeflaterFactory

public class DeflaterFactory extends Object
Factory for Deflater objects used by BlockCompressedOutputStream. This class may be extended to provide alternative deflaters (e.g., for improved performance).

By default, if Defaults.USE_LIBDEFLATE is true, this factory will attempt to create a

invalid reference
LibdeflateDeflater
backed by the libdeflate native library. If the native library is not available, it falls back to the JDK Deflater.

  • Constructor Details

    • DeflaterFactory

      public DeflaterFactory()
  • Method Details

    • makeDeflater

      public Deflater makeDeflater(int compressionLevel, boolean gzipCompatible)
      Returns a deflater object that will be used when writing BAM files. Subclasses may override to provide their own deflater implementation.
      Parameters:
      compressionLevel - the compression level (0-9)
      gzipCompatible - if true then use GZIP compatible compression