Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

It contains only flags in 1 byte.

Bits 0-1: Size class of the variable-length area.

Bit 2: Set if the nullmap is present.

Size class encodes the number of bytes used for entries in the offset table. It is encoded like this:

0b00 - 1 bytes

0b01 - 2 bytes

0b10 - 4 bytes

0b11 - 8 bytes

So the entry size can be calculated as follows:

Size = 1 << (flags & 0b11)

By the way, the last option works fine for C++ and possibly other languages but for Java it will be hard to support, so it might be excluded.

...