Class DeflateCompressor

    • Constructor Detail

      • DeflateCompressor

        public DeflateCompressor​(int level,
                                 boolean nowrap)
    • Method Detail

      • $lessinit$greater$default$1

        public static int $lessinit$greater$default$1()
      • $lessinit$greater$default$2

        public static boolean $lessinit$greater$default$2()
      • MinBufferSize

        public static int MinBufferSize()
        INTERNAL API
      • drainDeflater

        public static ByteString drainDeflater​(java.util.zip.Deflater deflater,
                                               byte[] buffer,
                                               ByteStringBuilder result)
      • drainDeflater$default$3

        public static ByteStringBuilder drainDeflater$default$3()
      • deflater

        protected java.util.zip.Deflater deflater()
      • compress

        public final ByteString compress​(ByteString input)
        Description copied from class: Compressor
        Compresses the given input and returns compressed data. The implementation can and will choose to buffer output data to improve compression. Use flush or compressAndFlush to make sure that all input data has been compressed and pending output data has been returned.
        Specified by:
        compress in class Compressor
        Parameters:
        input - (undocumented)
        Returns:
        (undocumented)
      • flush

        public final ByteString flush()
        Description copied from class: Compressor
        Flushes any output data and returns the currently remaining compressed data.
        Specified by:
        flush in class Compressor
        Returns:
        (undocumented)
      • finish

        public final ByteString finish()
        Description copied from class: Compressor
        Closes this compressed stream and return the remaining compressed data. After calling this method, this Compressor cannot be used any further.
        Specified by:
        finish in class Compressor
        Returns:
        (undocumented)
      • compressWithBuffer

        protected ByteString compressWithBuffer​(ByteString input,
                                                byte[] buffer)
      • flushWithBuffer

        protected ByteString flushWithBuffer​(byte[] buffer)
      • finishWithBuffer

        protected ByteString finishWithBuffer​(byte[] buffer)
      • close

        public void close()
        Description copied from class: Compressor
        Make sure any resources have been released
        Specified by:
        close in class Compressor