public class DeflateCompressor extends Compressor
Constructor and Description |
---|
DeflateCompressor() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Make sure any resources have been released
|
ByteString |
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) |
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() |
public static int MinBufferSize()
public static ByteString drainDeflater(java.util.zip.Deflater deflater, byte[] buffer, ByteStringBuilder result)
protected java.util.zip.Deflater deflater()
public final ByteString compressAndFlush(ByteString input)
Compressor
compressAndFlush
in class Compressor
public final ByteString compressAndFinish(ByteString input)
Compressor
compressAndFinish
in class Compressor
public final ByteString compress(ByteString input)
Compressor
flush
or compressAndFlush
to make sure that all input data has been
compressed and pending output data has been returned.compress
in class Compressor
input
- (undocumented)public final ByteString flush()
Compressor
flush
in class Compressor
public final ByteString finish()
Compressor
finish
in class Compressor
protected ByteString compressWithBuffer(ByteString input, byte[] buffer)
protected ByteString flushWithBuffer(byte[] buffer)
protected ByteString finishWithBuffer(byte[] buffer)
public void close()
Compressor
close
in class Compressor