getInt3 method

int getInt3(
  1. int startOffset
)

LĂȘ um inteiro de 3 bytes (little-endian) a partir de startOffset.

Esse formato (3 bytes) ocorre em algumas partes do protocolo que usam "int<3>" para valores como comprimentos ou contagens menores que 16M.

Implementation

int getInt3(int startOffset) {
  return getUint8(startOffset) |
      (getUint8(startOffset + 1) << 8) |
      (getUint8(startOffset + 2) << 16);
}