MCPcopy Create free account
hub / github.com/Effect-TS/effect / readInt32

Function readInt32

packages/sql/pg/src/PgTypes.ts:92–93  ·  view source on GitHub ↗
(bytes: Uint8Array, offset: number)

Source from the content-addressed store, hash-verified

90}
91
92const readInt32 = (bytes: Uint8Array, offset: number): number =>
93 (bytes[offset] << 24) | (bytes[offset + 1] << 16) | (bytes[offset + 2] << 8) | bytes[offset + 3]
94
95/** Writes an int64, given a value the caller has checked fits a double exactly. */
96const writeInt64 = (bytes: Uint8Array, offset: number, value: number): void => {

Callers 7

stage8Function · 0.85
readTimeMicrosFunction · 0.85
PgTypes.tsFile · 0.85
decodeArrayFunction · 0.85
decodeRecordFunction · 0.85
frameSizeFunction · 0.85
decodeMultirangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected