Interface IUnCompressor

    • Method Detail

      • getUnCompressor

        static IUnCompressor getUnCompressor​(CompressionType name)
        get the UnCompressor based on the CompressionType.
        Parameters:
        name - CompressionType
        Returns:
        the UnCompressor of specified CompressionType
      • getUncompressedLength

        int getUncompressedLength​(byte[] array,
                                  int offset,
                                  int length)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • getUncompressedLength

        int getUncompressedLength​(java.nio.ByteBuffer buffer)
                           throws java.io.IOException
        get the uncompressed length.
        Parameters:
        buffer - MUST be DirectByteBuffer
        Throws:
        java.io.IOException
      • uncompress

        byte[] uncompress​(byte[] byteArray)
                   throws java.io.IOException
        uncompress the byte array.
        Parameters:
        byteArray - to be uncompressed bytes
        Returns:
        bytes after uncompressed
        Throws:
        java.io.IOException
      • uncompress

        int uncompress​(byte[] byteArray,
                       int offset,
                       int length,
                       byte[] output,
                       int outOffset)
                throws java.io.IOException
        uncompress the byte array.
        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

        int uncompress​(java.nio.ByteBuffer compressed,
                       java.nio.ByteBuffer uncompressed)
                throws java.io.IOException
        if the data is large, using this function is better.
        Parameters:
        compressed - MUST be DirectByteBuffer
        uncompressed - MUST be DirectByteBuffer
        Throws:
        java.io.IOException