DirectDecompressionCodec, SplittableCompressionCodecBZip2Codec, DefaultCodec, DeflateCodec, GzipCodec, Lz4Codec, PassthroughCodec, SnappyCodec, ZStandardCodec@Public
@Evolving
public interface CompressionCodec
| Modifier and Type | Interface | Description |
|---|---|---|
static class |
CompressionCodec.Util |
| Modifier and Type | Method | Description |
|---|---|---|
Compressor |
createCompressor() |
Create a new
Compressor for use by this CompressionCodec. |
Decompressor |
createDecompressor() |
Create a new
Decompressor for use by this CompressionCodec. |
CompressionInputStream |
createInputStream(java.io.InputStream in) |
Create a
CompressionInputStream that will read from the given
input stream. |
CompressionInputStream |
createInputStream(java.io.InputStream in,
Decompressor decompressor) |
Create a
CompressionInputStream that will read from the given
InputStream with the given Decompressor. |
CompressionOutputStream |
createOutputStream(java.io.OutputStream out) |
Create a
CompressionOutputStream that will write to the given
OutputStream. |
CompressionOutputStream |
createOutputStream(java.io.OutputStream out,
Compressor compressor) |
Create a
CompressionOutputStream that will write to the given
OutputStream with the given Compressor. |
java.lang.Class<? extends Compressor> |
getCompressorType() |
Get the type of
Compressor needed by this CompressionCodec. |
java.lang.Class<? extends Decompressor> |
getDecompressorType() |
Get the type of
Decompressor needed by this CompressionCodec. |
java.lang.String |
getDefaultExtension() |
Get the default filename extension for this kind of compression.
|
CompressionOutputStream createOutputStream(java.io.OutputStream out) throws java.io.IOException
CompressionOutputStream that will write to the given
OutputStream.out - the location for the final output streamjava.io.IOException - raised on errors performing I/O.CompressionOutputStream createOutputStream(java.io.OutputStream out, Compressor compressor) throws java.io.IOException
CompressionOutputStream that will write to the given
OutputStream with the given Compressor.out - the location for the final output streamcompressor - compressor to usejava.io.IOException - raised on errors performing I/O.java.lang.Class<? extends Compressor> getCompressorType()
Compressor needed by this CompressionCodec.Compressor createCompressor()
Compressor for use by this CompressionCodec.CompressionInputStream createInputStream(java.io.InputStream in) throws java.io.IOException
CompressionInputStream that will read from the given
input stream.in - the stream to read compressed bytes fromjava.io.IOException - raised on errors performing I/O.CompressionInputStream createInputStream(java.io.InputStream in, Decompressor decompressor) throws java.io.IOException
CompressionInputStream that will read from the given
InputStream with the given Decompressor.in - the stream to read compressed bytes fromdecompressor - decompressor to usejava.io.IOException - raised on errors performing I/O.java.lang.Class<? extends Decompressor> getDecompressorType()
Decompressor needed by this CompressionCodec.Decompressor createDecompressor()
Decompressor for use by this CompressionCodec.java.lang.String getDefaultExtension()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.