Interface ICompressor<T extends java.nio.Buffer>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean compress​(T buffer, java.nio.ByteBuffer compressed)
      compress the buffer into the byte buffer.
      void decompress​(java.nio.ByteBuffer compressed, T buffer)
      Decompress the byte buffer and restore the buffer from it, again enough space must already be allocated.
    • Method Detail

      • compress

        boolean compress​(T buffer,
                         java.nio.ByteBuffer compressed)
        compress the buffer into the byte buffer. Attention enough space must already be allocated.
        Parameters:
        buffer - the buffer to compress.
        compressed - the compressed data
        Returns:
        true if the compression succeeded.
      • decompress

        void decompress​(java.nio.ByteBuffer compressed,
                        T buffer)
        Decompress the byte buffer and restore the buffer from it, again enough space must already be allocated.
        Parameters:
        compressed - the compressed data
        buffer - the buffer to fill with the uncompressed data.