Enum Class Compression_Types

java.lang.Object
java.lang.Enum<Compression_Types>
de.pauleff.formats.binary.Compression_Types
All Implemented Interfaces:
Serializable, Comparable<Compression_Types>, Constable

public enum Compression_Types extends Enum<Compression_Types>
Compression formats supported for NBT file storage. NBT files can be stored with different compression schemes depending on their usage context. Minecraft primarily uses GZIP compression, though other formats are supported for compatibility.
Author:
Paul Ferlitz
See Also:
  • Enum Constant Details

    • NONE

      public static final Compression_Types NONE
      No compression - raw NBT binary data
    • GZIP

      public static final Compression_Types GZIP
      GZIP compression - most common for Minecraft saves
    • ZLIB

      public static final Compression_Types ZLIB
      ZLIB compression - used by some Minecraft components
    • LZ4

      public static final Compression_Types LZ4
      LZ4 compression - planned support for high-performance scenarios
  • Method Details

    • values

      public static Compression_Types[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Compression_Types valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getById

      public static Compression_Types getById(int id)
      Looks up a compression type by its numeric identifier.
      Parameters:
      id - The compression type ID to find
      Returns:
      The corresponding Compression_Types enum, or null if ID is invalid
    • getId

      public int getId()
      Returns the numeric identifier for this compression type.
      Returns:
      The compression type ID
    • getName

      public String getName()
      Returns the human-readable name of this compression format.
      Returns:
      The compression type name (e.g., "GZIP", "ZLIB")