Class CompressionType

java.lang.Object
edu.harvard.hul.ois.jhove.module.gzip.CompressionType

public class CompressionType extends Object
Enumerated type for GZip supported compression types (extra flags in GZip header).
  • Field Details

    • MAXIMUM_COMPRESSION

      public static final CompressionType MAXIMUM_COMPRESSION
      GZip extra flag value for maximum compression.
    • FASTEST_ALGORITHM

      public static final CompressionType FASTEST_ALGORITHM
      GZip extra flag value for fastest algorithm.
    • value

      public final int value
      The integer value for the enum instance.
    • label

      public final String label
      The value description.
    • valid

      public final boolean valid
      Whether the value is valid.
  • Constructor Details

    • CompressionType

      protected CompressionType(int value, String label, boolean valid)
      Constructor.
      Parameters:
      value - The compression type value.
      label - The name of the compression type.
      valid - If it is a valid compression type.
  • Method Details

    • fromValue

      public static CompressionType fromValue(int n)
      Returns the enumerated value object corresponding to the specified integer value. If the integer value is unknown, an instance marked as not valid is returned.
      Parameters:
      n - the integer value to map.
      Returns:
      a compression type objet, valid if n is one of the defined valid values.