org.apache.hadoop.io.compress
Class LzopCodec

java.lang.Object
  extended by org.apache.hadoop.io.compress.LzoCodec
      extended by org.apache.hadoop.io.compress.LzopCodec
All Implemented Interfaces:
Configurable, CompressionCodec

public class LzopCodec
extends LzoCodec

A CompressionCodec for a streaming lzo compression/decompression pair compatible with lzop. http://www.lzop.org/


Nested Class Summary
protected static class LzopCodec.LzopDecompressor
           
protected static class LzopCodec.LzopInputStream
           
protected static class LzopCodec.LzopOutputStream
           
 
Constructor Summary
LzopCodec()
           
 
Method Summary
 Decompressor createDecompressor()
          Create a new Decompressor for use by this CompressionCodec.
 CompressionInputStream createInputStream(InputStream in, Decompressor decompressor)
          Create a CompressionInputStream that will read from the given InputStream with the given Decompressor.
 CompressionOutputStream createOutputStream(OutputStream out, Compressor compressor)
          Create a CompressionOutputStream that will write to the given OutputStream with the given Compressor.
 String getDefaultExtension()
          Get the default filename extension for this kind of compression.
 
Methods inherited from class org.apache.hadoop.io.compress.LzoCodec
createCompressor, createInputStream, createOutputStream, getCompressorType, getConf, getDecompressorType, isNativeLzoLoaded, setConf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LzopCodec

public LzopCodec()
Method Detail

createOutputStream

public CompressionOutputStream createOutputStream(OutputStream out,
                                                  Compressor compressor)
                                           throws IOException
Description copied from interface: CompressionCodec
Create a CompressionOutputStream that will write to the given OutputStream with the given Compressor.

Specified by:
createOutputStream in interface CompressionCodec
Overrides:
createOutputStream in class LzoCodec
Parameters:
out - the location for the final output stream
compressor - compressor to use
Returns:
a stream the user can write uncompressed data to have it compressed
Throws:
IOException

createInputStream

public CompressionInputStream createInputStream(InputStream in,
                                                Decompressor decompressor)
                                         throws IOException
Description copied from interface: CompressionCodec
Create a CompressionInputStream that will read from the given InputStream with the given Decompressor.

Specified by:
createInputStream in interface CompressionCodec
Overrides:
createInputStream in class LzoCodec
Parameters:
in - the stream to read compressed bytes from
decompressor - decompressor to use
Returns:
a stream to read uncompressed bytes from
Throws:
IOException

createDecompressor

public Decompressor createDecompressor()
Description copied from interface: CompressionCodec
Create a new Decompressor for use by this CompressionCodec.

Specified by:
createDecompressor in interface CompressionCodec
Overrides:
createDecompressor in class LzoCodec
Returns:
a new decompressor for use by this codec

getDefaultExtension

public String getDefaultExtension()
Description copied from class: LzoCodec
Get the default filename extension for this kind of compression.

Specified by:
getDefaultExtension in interface CompressionCodec
Overrides:
getDefaultExtension in class LzoCodec
Returns:
the extension including the '.'


Copyright © 2008 The Apache Software Foundation