Interface GlueSchemaRegistryCompressionHandler
- All Known Implementing Classes:
GlueSchemaRegistryDefaultCompression
public interface GlueSchemaRegistryCompressionHandler
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault 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 Details
-
BUFFER_SIZE
static final int BUFFER_SIZE- See Also:
-
-
Method Details
-
writeToDeflatorObject
- Throws:
IOException
-
getDeflatorObject
-
getInflatorObject
-
decompress
- Throws:
IOException
-
writeToByteArrayOutputStream
static byte[] writeToByteArrayOutputStream(Inflater inflater, ByteArrayOutputStream outputStream) throws IOException - Throws:
IOException
-
compress
Compresses the record.- Parameters:
record-- Returns:
- compressed byte array representation.
- Throws:
IOException
-
decompress
Need 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
-