org.apache.hadoop.io.compress.zlib
Enum ZlibCompressor.CompressionStrategy

java.lang.Object
  extended by java.lang.Enum<ZlibCompressor.CompressionStrategy>
      extended by org.apache.hadoop.io.compress.zlib.ZlibCompressor.CompressionStrategy
All Implemented Interfaces:
Serializable, Comparable<ZlibCompressor.CompressionStrategy>
Enclosing class:
ZlibCompressor

public static enum ZlibCompressor.CompressionStrategy
extends Enum<ZlibCompressor.CompressionStrategy>

The compression level for zlib library.


Enum Constant Summary
DEFAULT_STRATEGY
          Default compression strategy.
FILTERED
          Compression strategy best used for data consisting mostly of small values with a somewhat random distribution.
FIXED
          Compression strategy to prevent the use of dynamic Huffman codes, allowing for a simpler decoder for special applications.
HUFFMAN_ONLY
          Compression strategy for Huffman coding only.
RLE
          Compression strategy to limit match distances to one (run-length encoding).
 
Method Summary
static ZlibCompressor.CompressionStrategy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ZlibCompressor.CompressionStrategy[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

FILTERED

public static final ZlibCompressor.CompressionStrategy FILTERED
Compression strategy best used for data consisting mostly of small values with a somewhat random distribution. Forces more Huffman coding and less string matching.


HUFFMAN_ONLY

public static final ZlibCompressor.CompressionStrategy HUFFMAN_ONLY
Compression strategy for Huffman coding only.


RLE

public static final ZlibCompressor.CompressionStrategy RLE
Compression strategy to limit match distances to one (run-length encoding).


FIXED

public static final ZlibCompressor.CompressionStrategy FIXED
Compression strategy to prevent the use of dynamic Huffman codes, allowing for a simpler decoder for special applications.


DEFAULT_STRATEGY

public static final ZlibCompressor.CompressionStrategy DEFAULT_STRATEGY
Default compression strategy.

Method Detail

values

public static ZlibCompressor.CompressionStrategy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ZlibCompressor.CompressionStrategy c : ZlibCompressor.CompressionStrategy.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ZlibCompressor.CompressionStrategy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2009 The Apache Software Foundation