Class SnappyDecompressor

  • All Implemented Interfaces:
    org.apache.hadoop.io.compress.Decompressor

    public class SnappyDecompressor
    extends NonBlockedDecompressor
    • Constructor Detail

      • SnappyDecompressor

        public SnappyDecompressor()
    • Method Detail

      • uncompress

        protected int uncompress​(ByteBuffer compressed,
                                 ByteBuffer uncompressed)
                          throws IOException
        Description copied from class: NonBlockedDecompressor
        Uncompress the content in the input buffer. The result is dumped to the specified output buffer.
        Specified by:
        uncompress in class NonBlockedDecompressor
        Parameters:
        compressed - buffer[pos() ... limit()) containing the input data
        uncompressed - output of the the uncompressed data. It uses buffer[pos()..]
        Returns:
        uncompressed data size
        Throws:
        IOException
      • maxUncompressedLength

        protected int maxUncompressedLength​(ByteBuffer compressed,
                                            int maxUncompressedLength)
                                     throws IOException
        Description copied from class: NonBlockedDecompressor
        Get the maximum uncompressed byte size of the given compressed input. This operation takes O(1) time.
        Specified by:
        maxUncompressedLength in class NonBlockedDecompressor
        Parameters:
        compressed - input data [pos() ... limit())
        maxUncompressedLength - maximum length of the uncompressed data
        Returns:
        uncompressed byte length of the given input
        Throws:
        IOException