Module: Omnizip::Filters::Bcj2Constants
- Included in:
- Bcj2Decoder, Bcj2Encoder, Bcj2StreamData
- Defined in:
- lib/omnizip/filters/bcj2/constants.rb
Constant Summary collapse
- NUM_STREAMS =
Number of output streams
4- STREAM_MAIN =
Stream indices
0- STREAM_CALL =
Main data stream (non-convertible bytes)
1- STREAM_JUMP =
CALL instruction addresses (E8)
2- STREAM_RC =
JUMP instruction addresses (E9)
3- OPCODE_CALL =
x86 opcodes
0xE8- OPCODE_JUMP =
CALL instruction
0xE9- ADDRESS_SIZE =
Size of x86 address (4 bytes, little-endian)
4- TOP_VALUE =
Range coder constants
1 << 24
- BIT_MODEL_TOTAL_BITS =
Range normalization threshold
11- BIT_MODEL_TOTAL =
Probability model bits
1 << BIT_MODEL_TOTAL_BITS
- MOVE_BITS =
Probability update shift
5- NUM_PROBS =
Number of probability models (2 + 256)
- 2 for general cases (not E8/E9, or 0F8x pattern)
- 256 for byte-specific models when processing E8
2 + 256
- INITIAL_PROB =
Initial probability value (50%)
BIT_MODEL_TOTAL >> 1