org.apache.hadoop.io.compress
Class LzopCodec.LzopDecompressor

java.lang.Object
  extended by org.apache.hadoop.io.compress.lzo.LzoDecompressor
      extended by org.apache.hadoop.io.compress.LzopCodec.LzopDecompressor
All Implemented Interfaces:
Decompressor
Enclosing class:
LzopCodec

protected static class LzopCodec.LzopDecompressor
extends LzoDecompressor


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.io.compress.lzo.LzoDecompressor
LzoDecompressor.CompressionStrategy
 
Field Summary
 
Fields inherited from class org.apache.hadoop.io.compress.lzo.LzoDecompressor
LZO_LIBRARY_VERSION
 
Constructor Summary
LzopCodec.LzopDecompressor(int bufferSize)
          Create an LzoDecompressor with LZO1X strategy (the only lzo algorithm supported by lzop).
 
Method Summary
 int decompress(byte[] b, int off, int len)
          Fills specified buffer with uncompressed data.
 void initHeaderFlags(EnumSet<org.apache.hadoop.io.compress.LzopCodec.DChecksum> dflags, EnumSet<org.apache.hadoop.io.compress.LzopCodec.CChecksum> cflags)
          Given a set of decompressed and compressed checksums,
 void resetChecksum()
          Reset all checksums registered for this decompressor instance.
 void setInput(byte[] b, int off, int len)
          Sets input data for decompression.
 boolean verifyCChecksum(org.apache.hadoop.io.compress.LzopCodec.CChecksum typ, int checksum)
          Given a checksum type, verity its value against that observed in compressed data.
 boolean verifyDChecksum(org.apache.hadoop.io.compress.LzopCodec.DChecksum typ, int checksum)
          Given a checksum type, verify its value against that observed in decompressed data.
 
Methods inherited from class org.apache.hadoop.io.compress.lzo.LzoDecompressor
end, finalize, finished, isNativeLzoLoaded, needsDictionary, needsInput, reset, setDictionary
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LzopCodec.LzopDecompressor

public LzopCodec.LzopDecompressor(int bufferSize)
Create an LzoDecompressor with LZO1X strategy (the only lzo algorithm supported by lzop).

Method Detail

initHeaderFlags

public void initHeaderFlags(EnumSet<org.apache.hadoop.io.compress.LzopCodec.DChecksum> dflags,
                            EnumSet<org.apache.hadoop.io.compress.LzopCodec.CChecksum> cflags)
Given a set of decompressed and compressed checksums,


resetChecksum

public void resetChecksum()
Reset all checksums registered for this decompressor instance.


verifyDChecksum

public boolean verifyDChecksum(org.apache.hadoop.io.compress.LzopCodec.DChecksum typ,
                               int checksum)
Given a checksum type, verify its value against that observed in decompressed data.


verifyCChecksum

public boolean verifyCChecksum(org.apache.hadoop.io.compress.LzopCodec.CChecksum typ,
                               int checksum)
Given a checksum type, verity its value against that observed in compressed data.


setInput

public void setInput(byte[] b,
                     int off,
                     int len)
Description copied from interface: Decompressor
Sets input data for decompression. This should be called whenever #needsInput() returns true indicating that more input data is required.

Specified by:
setInput in interface Decompressor
Overrides:
setInput in class LzoDecompressor
Parameters:
b - Input data
off - Start offset
len - Length

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 #needsInput() should be called in order to determine if more input data is required.

Specified by:
decompress in interface Decompressor
Overrides:
decompress in class LzoDecompressor
Parameters:
b - Buffer for the compressed data
off - Start offset of the data
len - Size of the buffer
Returns:
The actual number of bytes of compressed data.
Throws:
IOException


Copyright © 2008 The Apache Software Foundation