Module: RuneRb::Core::Constants

Included in:
RuneRb::Core
Defined in:
lib/rune/core/constants.rb

Overview

Since:

  • 0.1.0

Constant Summary collapse

BYTE_ORDERS =

Acceptable byte orders in which multi-byte values can be read.

Returns:

  • (Array<Symbol>)

Since:

  • 0.1.0

%i[BIG MIDDLE INVERSE_MIDDLE LITTLE].freeze
BYTE_SIZE =

The size of one byte

Returns:

  • (Integer)

Since:

  • 0.1.0

8
BYTE_MUTATIONS =

Valid byte mutations

Returns:

  • (Array<Symbol>)

Since:

  • 0.1.0

%i[ADD NEG SUB STD].freeze
RW_TYPES =

Valid types for reading/writing

Returns:

  • (Array<Symbol>)

Since:

  • 0.1.0

%i[bits bit byte bytes medium int long reverse_bytes short smart string].freeze
BIT_MASK_OUT =

Bit masks for bit packing

Returns:

  • (Array<Integer>)

Since:

  • 0.1.0

(0...32).collect { (1 << _1) - 1 }.freeze
ARCHIVE_COUNT =

The number of archives in the cache.

Returns:

  • (Integer)

Since:

  • 0.1.0

0x9
INDEX_SIZE =

The size of a single index

Returns:

  • (Integer)

Since:

  • 0.1.0

0x6
DATA_BLOCK_SIZE =

The size of a single data block

Returns:

  • (Integer)

Since:

  • 0.1.0

0x200
DATA_HEADER_SIZE =

The size of a single data header

Returns:

  • (Integer)

Since:

  • 0.1.0

0x8
DATA_SIZE =

The size of a chunk of data

Returns:

  • (Integer)

Since:

  • 0.1.0

DATA_BLOCK_SIZE + DATA_HEADER_SIZE
INT24_BYTE_ORDERS =

The possible byte orders for reading/writing 24-bit integers. The integers will only be written in big or middle endian byte order.

Returns:

  • (Hash<Symbol, Array<Integer>>)

Since:

  • 0.1.0

{
  BIG: [0, 1, 2].freeze,
  LITTLE: [2, 1, 0].freeze
}.freeze