Package akka.stream.impl.io.compression
Class DeflateCompressor
- java.lang.Object
-
- akka.stream.impl.io.compression.Compressor
-
- akka.stream.impl.io.compression.DeflateCompressor
-
- Direct Known Subclasses:
GzipCompressor
public class DeflateCompressor extends Compressor
INTERNAL API
-
-
Constructor Summary
Constructors Constructor Description DeflateCompressor(int level, boolean nowrap)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
$lessinit$greater$default$1()
static boolean
$lessinit$greater$default$2()
void
close()
Make sure any resources have been releasedByteString
compress(ByteString input)
Compresses the given input and returns compressed data.ByteString
compressAndFinish(ByteString input)
Combines `compress` + `finish`ByteString
compressAndFlush(ByteString input)
Combines `compress` + `flush`protected ByteString
compressWithBuffer(ByteString input, byte[] buffer)
protected java.util.zip.Deflater
deflater()
static ByteString
drainDeflater(java.util.zip.Deflater deflater, byte[] buffer, ByteStringBuilder result)
static ByteStringBuilder
drainDeflater$default$3()
ByteString
finish()
Closes this compressed stream and return the remaining compressed data.protected ByteString
finishWithBuffer(byte[] buffer)
ByteString
flush()
Flushes any output data and returns the currently remaining compressed data.protected ByteString
flushWithBuffer(byte[] buffer)
static int
MinBufferSize()
INTERNAL API
-
-
-
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()
-
compressAndFlush
public final ByteString compressAndFlush(ByteString input)
Description copied from class:Compressor
Combines `compress` + `flush`- Specified by:
compressAndFlush
in classCompressor
-
compressAndFinish
public final ByteString compressAndFinish(ByteString input)
Description copied from class:Compressor
Combines `compress` + `finish`- Specified by:
compressAndFinish
in classCompressor
-
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. Useflush
orcompressAndFlush
to make sure that all input data has been compressed and pending output data has been returned.- Specified by:
compress
in classCompressor
-
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 classCompressor
-
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 classCompressor
-
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 classCompressor
-
-