org.hd.d.pg2k.svrCore
Enum CompressionLevel

java.lang.Object
  extended by java.lang.Enum<CompressionLevel>
      extended by org.hd.d.pg2k.svrCore.CompressionLevel
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<CompressionLevel>

public enum CompressionLevel
extends java.lang.Enum<CompressionLevel>

A ranked series of compression methods/levels used in PG2K. This applies to such things as tunnel-frame content and HTTP transport encodings.

Higher numeric levels potentially give greater compression at potentially higher resource cost (especially in the compressor), though YMMV.

The order of elements is from lowest to highest compression.


Enum Constant Summary
BZIP2
          BZIP2-style compression; more expensive than ZIP (maybe 5x CPU) but more effective on some data sets.
LZMA
          LZMA (7-Zip-style) compression; more expensive than ZIP and less tested, but much more effective on some data sets.
NONE
          No compression, thus free to compress/decompress but possibly expensive to store or transmit.
PPM
          PPM compression; very expensive in CPU and memory, but about the best compression available.
ZIP
          GZIP/deflate/zlib-style compression; widely used and generally cheap and effective.
 
Field Summary
private  int level
          The "level", higher meaning generally better and more expensive; 0 indicates none.
 
Method Summary
 int getLevel()
          Get the "level", higher meaning generally better and more expensive; 0 indicates none.
static CompressionLevel valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static CompressionLevel[] 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

NONE

public static final CompressionLevel NONE
No compression, thus free to compress/decompress but possibly expensive to store or transmit.


ZIP

public static final CompressionLevel ZIP
GZIP/deflate/zlib-style compression; widely used and generally cheap and effective.


BZIP2

public static final CompressionLevel BZIP2
BZIP2-style compression; more expensive than ZIP (maybe 5x CPU) but more effective on some data sets.


LZMA

public static final CompressionLevel LZMA
LZMA (7-Zip-style) compression; more expensive than ZIP and less tested, but much more effective on some data sets.


PPM

public static final CompressionLevel PPM
PPM compression; very expensive in CPU and memory, but about the best compression available.

Field Detail

level

private final int level
The "level", higher meaning generally better and more expensive; 0 indicates none.

Method Detail

values

public static CompressionLevel[] 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 (CompressionLevel c : CompressionLevel.values())
    System.out.println(c);

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

valueOf

public static CompressionLevel valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getLevel

public final int getLevel()
Get the "level", higher meaning generally better and more expensive; 0 indicates none.


DHD Multimedia Gallery V1.50.55

Copyright (c) 1996-2008, Damon Hart-Davis. All rights reserved.