Enum Class SizeSpec.ModuleType

java.lang.Object
java.lang.Enum<SizeSpec.ModuleType>
dev.gmitch215.bytebox.gradle.SizeSpec.ModuleType
All Implemented Interfaces:
Serializable, Comparable<SizeSpec.ModuleType>, Constable
Enclosing class:
SizeSpec

public static enum SizeSpec.ModuleType extends Enum<SizeSpec.ModuleType>
How the compiled module is carried in the bundle.
  • Enum Constant Details

    • AUTO

      public static final SizeSpec.ModuleType AUTO
      Picks on measured size: raw bytes below the crossover, a compressed frame above it.

      The crossover is where a frame starts saving more than the decompressor costs, which is near 120 KB of raw WebAssembly.

    • DATA

      public static final SizeSpec.ModuleType DATA
      Raw bytes in a Data module, compressed by Cloudflare's own gzip.

      Smallest below the crossover, and needs no decompressor in the bundle at all.

    • DATA_COMPRESSED

      public static final SizeSpec.ModuleType DATA_COMPRESSED
      A compressed frame in a Data module, inflated at module scope.

      Wins once the frame saves more than the decompressor costs. The decompressor has to be synchronous, because a module-scope await never settles on this runtime.

  • Method Details

    • values

      public static SizeSpec.ModuleType[] 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 SizeSpec.ModuleType 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