Skip to content

getUint32Be

getUint32Be(data, offset, byteLength?): number

Defined in: packages/core/src/buffer/codec/get-uint32-be.ts:16

Reads a big-endian unsigned integer from data at offset.

Unlike DataView.getUint32, this reads straight from the array and therefore needs no view object per call. The caller is responsible for ensuring that byteLength bytes are available at offset.

Uint8Array

The bytes to read from.

number

The index of the first byte to read.

number = 4

How many bytes to read, in the 0..4 range. Defaults to 4 (a full word); fewer bytes read a narrower big-endian integer formed from just those leading bytes — not a zero-padded full word — for a binary format’s variable-width or partial trailing fields.

number

The value as an unsigned 32-bit integer.