Class VeniceCompressor

    • Field Detail

    • Constructor Detail

    • Method Detail

      • compress

        public abstract byte[] compress​(byte[] data)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • compress

        public abstract java.nio.ByteBuffer compress​(java.nio.ByteBuffer src,
                                                     int startPositionOfOutput)
                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • decompress

        public abstract java.nio.ByteBuffer decompress​(java.nio.ByteBuffer data)
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • decompress

        public abstract java.nio.ByteBuffer decompress​(byte[] data,
                                                       int offset,
                                                       int length)
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • decompressAndPrependSchemaHeader

        public abstract java.nio.ByteBuffer decompressAndPrependSchemaHeader​(byte[] data,
                                                                             int offset,
                                                                             int length,
                                                                             int schemaHeader)
                                                                      throws java.io.IOException
        This method tries to decompress data and maybe prepend the schema header. The returned ByteBuffer will be backed by byte array that starts with schema header, followed by the decompressed data. The ByteBuffer will be positioned at the beginning of the decompressed data and the remaining of the ByteBuffer will be the length of the decompressed data.
        Throws:
        java.io.IOException
      • decompress

        public abstract java.io.InputStream decompress​(java.io.InputStream inputStream)
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException