Interface GlueSchemaRegistryCompressionHandler
-
- All Known Implementing Classes:
GlueSchemaRegistryDefaultCompression
public interface GlueSchemaRegistryCompressionHandler
-
-
Field Summary
Fields Modifier and Type Field Description static intBUFFER_SIZE
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description default byte[]compress(byte[] record)Compresses the record.default byte[]decompress(byte[] compressedRecord, int start, int end)Need to provide the start bit and end bit for decompressor to decompress the specified bits in the byte array.static byte[]decompress(Inflater inflater, int size)static DeflatergetDeflatorObject(byte[] record)static InflatergetInflatorObject(byte[] compressedRecord, int start, int end)static byte[]writeToByteArrayOutputStream(Inflater inflater, ByteArrayOutputStream outputStream)static byte[]writeToDeflatorObject(byte[] record, Deflater deflater)
-
-
-
Field Detail
-
BUFFER_SIZE
static final int BUFFER_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
writeToDeflatorObject
static byte[] writeToDeflatorObject(byte[] record, Deflater deflater) throws IOException- Throws:
IOException
-
getDeflatorObject
static Deflater getDeflatorObject(byte[] record)
-
getInflatorObject
static Inflater getInflatorObject(byte[] compressedRecord, int start, int end)
-
decompress
static byte[] decompress(Inflater inflater, int size) throws IOException
- Throws:
IOException
-
writeToByteArrayOutputStream
static byte[] writeToByteArrayOutputStream(Inflater inflater, ByteArrayOutputStream outputStream) throws IOException
- Throws:
IOException
-
compress
default byte[] compress(byte[] record) throws IOExceptionCompresses the record.- Parameters:
record-- Returns:
- compressed byte array representation.
- Throws:
IOException
-
decompress
default byte[] decompress(byte[] compressedRecord, int start, int end) throws IOExceptionNeed to provide the start bit and end bit for decompressor to decompress the specified bits in the byte array.- Parameters:
compressedRecord-start-end-- Returns:
- decompressed byte array.
- Throws:
IOException
-
-