Class IUnCompressor.SnappyUnCompressor

    • Constructor Detail

      • SnappyUnCompressor

        public SnappyUnCompressor()
    • Method Detail

      • getUncompressedLength

        public int getUncompressedLength​(byte[] array,
                                         int offset,
                                         int length)
                                  throws java.io.IOException
        Specified by:
        getUncompressedLength in interface IUnCompressor
        Throws:
        java.io.IOException
      • getUncompressedLength

        public int getUncompressedLength​(java.nio.ByteBuffer buffer)
                                  throws java.io.IOException
        Description copied from interface: IUnCompressor
        get the uncompressed length.
        Specified by:
        getUncompressedLength in interface IUnCompressor
        Parameters:
        buffer - MUST be DirectByteBuffer
        Throws:
        java.io.IOException
      • uncompress

        public byte[] uncompress​(byte[] bytes)
        Description copied from interface: IUnCompressor
        uncompress the byte array.
        Specified by:
        uncompress in interface IUnCompressor
        Parameters:
        bytes - to be uncompressed bytes
        Returns:
        bytes after uncompressed
      • uncompress

        public int uncompress​(byte[] byteArray,
                              int offset,
                              int length,
                              byte[] output,
                              int outOffset)
                       throws java.io.IOException
        Description copied from interface: IUnCompressor
        uncompress the byte array.
        Specified by:
        uncompress in interface IUnCompressor
        Parameters:
        byteArray - -to be uncompressed bytes
        offset - -offset
        length - -length
        output - -output byte
        outOffset - -
        Returns:
        the valid length of the output array
        Throws:
        java.io.IOException
      • uncompress

        public int uncompress​(java.nio.ByteBuffer compressed,
                              java.nio.ByteBuffer uncompressed)
        Description copied from interface: IUnCompressor
        if the data is large, using this function is better.
        Specified by:
        uncompress in interface IUnCompressor
        Parameters:
        compressed - MUST be DirectByteBuffer
        uncompressed - MUST be DirectByteBuffer