MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / ensureAligned4

Method ensureAligned4

packages/core/src/binary/reader.ts:49–57  ·  view source on GitHub ↗

Validate that offset is 4-byte aligned; throws ZR_MISALIGNED on violation.

(offset: number = this.off)

Source from the content-addressed store, hash-verified

47
48 /** Validate that offset is 4-byte aligned; throws ZR_MISALIGNED on violation. */
49 ensureAligned4(offset: number = this.off): void {
50 if ((offset & 3) !== 0) {
51 throw new ZrBinaryError({
52 code: "ZR_MISALIGNED",
53 offset,
54 detail: "offset must be 4-byte aligned",
55 });
56 }
57 }
58
59 /** Advance cursor by len bytes without reading; validates bounds first. */
60 skip(len: number): void {

Callers 1

reader.test.tsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected