Class BestAndDefaultDeflateExecutorCompressor

  • All Implemented Interfaces:
    Compressor

    public class BestAndDefaultDeflateExecutorCompressor
    extends ExecutorCompressor
    Compressor that tries both the best and default compression algorithms and picks the default unless the best is at least a given percentage smaller.
    • Constructor Detail

      • BestAndDefaultDeflateExecutorCompressor

        public BestAndDefaultDeflateExecutorCompressor​(java.util.concurrent.Executor executor,
                                                       double minRatio)
        Creates a new compressor.
        Parameters:
        executor - the executor used to perform compression activities.
        minRatio - the minimum best compression size / default compression size needed to pick the default compression size; if 0.0 then the default compression is always picked, if 1.0 then the best compression is always picked unless it produces the exact same size as the default compression.
      • BestAndDefaultDeflateExecutorCompressor

        @Deprecated
        public BestAndDefaultDeflateExecutorCompressor​(java.util.concurrent.Executor executor,
                                                       ByteTracker tracker,
                                                       double minRatio)
        Deprecated.
    • Method Detail