Interface GlueSchemaRegistryCompressionHandler

All Known Implementing Classes:
GlueSchemaRegistryDefaultCompression

public interface GlueSchemaRegistryCompressionHandler
  • Field Details

  • Method Details

    • 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 IOException
      Compresses the record.
      Parameters:
      record -
      Returns:
      compressed byte array representation.
      Throws:
      IOException
    • decompress

      default byte[] decompress(byte[] compressedRecord, int start, int end) throws IOException
      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