Package org.apache.orc.impl
Class BrotliCodec
java.lang.Object
org.apache.orc.impl.BrotliCodec
- All Implemented Interfaces:
Closeable,AutoCloseable,CompressionCodec,DirectDecompressionCodec
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.orc.CompressionCodec
CompressionCodec.DataKind, CompressionCodec.Options, CompressionCodec.SpeedModifier -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Return the codec to the pool.booleancompress(ByteBuffer in, ByteBuffer out, ByteBuffer overflow, CompressionCodec.Options options) Compress the in buffer to the out buffer.voiddecompress(ByteBuffer in, ByteBuffer out) Decompress the in buffer to the out buffer.voiddestroy()Closes the codec, releasing the resources.voiddirectDecompress(ByteBuffer in, ByteBuffer out) Get the default options for this codec.getKind()Get the compression kind.booleanvoidreset()Resets the codec, preparing it for reuse.
-
Constructor Details
-
BrotliCodec
public BrotliCodec()
-
-
Method Details
-
getDefaultOptions
Description copied from interface:CompressionCodecGet the default options for this codec.- Specified by:
getDefaultOptionsin interfaceCompressionCodec- Returns:
- the default options object
-
compress
public boolean compress(ByteBuffer in, ByteBuffer out, ByteBuffer overflow, CompressionCodec.Options options) throws IOException Description copied from interface:CompressionCodecCompress the in buffer to the out buffer.- Specified by:
compressin interfaceCompressionCodec- Parameters:
in- the bytes to compressout- the compressed bytesoverflow- put any additional bytes hereoptions- the options to control compression- Returns:
- true if the output is smaller than input
- Throws:
IOException
-
decompress
Description copied from interface:CompressionCodecDecompress the in buffer to the out buffer.- Specified by:
decompressin interfaceCompressionCodec- Parameters:
in- the bytes to decompressout- the decompressed bytes- Throws:
IOException
-
isAvailable
public boolean isAvailable()- Specified by:
isAvailablein interfaceDirectDecompressionCodec
-
getKind
Description copied from interface:CompressionCodecGet the compression kind.- Specified by:
getKindin interfaceCompressionCodec
-
directDecompress
- Specified by:
directDecompressin interfaceDirectDecompressionCodec- Throws:
IOException
-
reset
public void reset()Description copied from interface:CompressionCodecResets the codec, preparing it for reuse.- Specified by:
resetin interfaceCompressionCodec
-
destroy
public void destroy()Description copied from interface:CompressionCodecCloses the codec, releasing the resources.- Specified by:
destroyin interfaceCompressionCodec
-
close
public void close()Description copied from interface:CompressionCodecReturn the codec to the pool.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceCompressionCodec
-