Class QuantizeProcessor.FloatQuantCompressor

    • Field Detail

      • postCompressor

        private final ICompressor<java.nio.IntBuffer> postCompressor
    • Constructor Detail

      • FloatQuantCompressor

        public FloatQuantCompressor​(QuantizeOption quantizeOption,
                                    ICompressor<java.nio.IntBuffer> postCompressor)
    • Method Detail

      • compress

        public boolean compress​(java.nio.FloatBuffer buffer,
                                java.nio.ByteBuffer compressed)
        Description copied from interface: ICompressor
        compress the buffer into the byte buffer. Attention enough space must already be allocated.
        Specified by:
        compress in interface ICompressor<java.nio.FloatBuffer>
        Parameters:
        buffer - the buffer to compress.
        compressed - the compressed data
        Returns:
        true if the compression succeeded.
      • decompress

        public void decompress​(java.nio.ByteBuffer compressed,
                               java.nio.FloatBuffer buffer)
        Description copied from interface: ICompressor
        Decompress the byte buffer and restore the buffer from it, again enough space must already be allocated.
        Specified by:
        decompress in interface ICompressor<java.nio.FloatBuffer>
        Parameters:
        compressed - the compressed data
        buffer - the buffer to fill with the uncompressed data.