Class BuiltInZlibInflater

java.lang.Object
java.util.zip.Inflater
org.apache.hadoop.io.compress.zlib.BuiltInZlibInflater
All Implemented Interfaces:
Decompressor

public class BuiltInZlibInflater extends Inflater implements Decompressor
A wrapper around java.util.zip.Inflater to make it conform to org.apache.hadoop.io.compress.Decompressor interface.
  • Constructor Details

    • BuiltInZlibInflater

      public BuiltInZlibInflater(boolean nowrap)
    • BuiltInZlibInflater

      public BuiltInZlibInflater()
  • Method Details

    • decompress

      public int decompress(byte[] b, int off, int len) throws IOException
      Description copied from interface: Decompressor
      Fills specified buffer with uncompressed data. Returns actual number of bytes of uncompressed data. A return value of 0 indicates that Decompressor.needsInput() should be called in order to determine if more input data is required.
      Specified by:
      decompress in interface Decompressor
      Parameters:
      b - Buffer for the uncompressed data
      off - Start offset of the data
      len - Size of the buffer
      Returns:
      The actual number of bytes of uncompressed data.
      Throws:
      IOException - raised on errors performing I/O.