Enum CompressionLevel

    • Enum Constant Detail

      • NO_COMPRESSION

        public static final CompressionLevel NO_COMPRESSION
        Level 0 - No compression
      • FASTEST

        public static final CompressionLevel FASTEST
        Level 1 Deflate compression. Fastest compression.
      • FASTER

        public static final CompressionLevel FASTER
        Level 2 Deflate compression
      • MEDIUM_FAST

        public static final CompressionLevel MEDIUM_FAST
        Level 4 Deflate compression
      • NORMAL

        public static final CompressionLevel NORMAL
        Level 5 Deflate compression. A compromise between speed and compression level.
      • HIGHER

        public static final CompressionLevel HIGHER
        Level 6 Deflate compression
      • MAXIMUM

        public static final CompressionLevel MAXIMUM
        Level 7 Deflate compression
      • PRE_ULTRA

        public static final CompressionLevel PRE_ULTRA
        Level 8 Deflate compression
      • ULTRA

        public static final CompressionLevel ULTRA
        Level 9 Deflate compression. Highest compression.
    • 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​(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
      • getLevel

        public int getLevel()
        Get the Deflate compression level (0-9) for this CompressionLevel
        Returns:
        the deflate compression level