BuiltInZlibDeflater (Hadoop 0.20.1+169.88 API)
Date: 2010-05-20

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.io.compress.zlib
Class BuiltInZlibDeflater

    java.lang.Object
      java.util.zip.Deflater
          org.apache.hadoop.io.compress.zlib.BuiltInZlibDeflater

All Implemented Interfaces:
  Compressor

    public class BuiltInZlibDeflater

extends Deflater
implements Compressor

A wrapper around java.util.zip.Deflater to make it conform to org.apache.hadoop.io.compress.Compressor interface.

Field Summary

Fields inherited from class java.util.zip.Deflater
`BEST_COMPRESSION, BEST_SPEED, DEFAULT_COMPRESSION, DEFAULT_STRATEGY, DEFLATED, FILTERED, HUFFMAN_ONLY, NO_COMPRESSION`

Constructor Summary
`BuiltInZlibDeflater()`
`BuiltInZlibDeflater(int level)`
`BuiltInZlibDeflater(int level, boolean nowrap)`

Method Summary
`int` | `compress(byte[] b, int off, int len)` Fills specified buffer with compressed data.

Methods inherited from class java.util.zip.Deflater
`deflate, deflate, end, finalize, finish, finished, getAdler, getBytesRead, getBytesWritten, getTotalIn, getTotalOut, needsInput, reset, setDictionary, setDictionary, setInput, setInput, setLevel, setStrategy`

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.apache.hadoop.io.compress.Compressor
`end, finish, finished, getBytesRead, getBytesWritten, needsInput, reset, setDictionary, setInput`

Constructor Detail

### BuiltInZlibDeflater

    public BuiltInZlibDeflater(int level,
                               boolean nowrap)

### BuiltInZlibDeflater

    public BuiltInZlibDeflater(int level)

### BuiltInZlibDeflater

    public BuiltInZlibDeflater()

Method Detail

### compress

    public int compress(byte[] b,
                        int off,
                        int len)
                 throws IOException

  Description copied from interface: `Compressor`
  Fills specified buffer with compressed data. Returns actual number of bytes of compressed data. A return value of 0 indicates that needsInput() should be called in order to determine if more input data is required.

  Specified by:
    `compress` in interface `Compressor`
  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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation