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

Function readWith

packages/sql/pg/src/PgTypes.ts:1864–1865  ·  view source on GitHub ↗
(codec: UnsafeCodec<any>, bytes: Uint8Array, offset: number, size: number)

Source from the content-addressed store, hash-verified

1862}
1863
1864const readWith = (codec: UnsafeCodec<any>, bytes: Uint8Array, offset: number, size: number): unknown =>
1865 codec.read !== undefined ? codec.read(bytes, offset, size) : codec.decode(region(bytes, offset, size))
1866
1867/** `headerSize` bytes for the caller to fill, then each part behind its int32 length. */
1868const framed = (headerSize: number, parts: ReadonlyArray<Uint8Array>): Uint8Array => {

Callers 2

decodeRangeFunction · 0.85
decodeMultirangeFunction · 0.85

Calls 3

regionFunction · 0.70
readMethod · 0.65
decodeMethod · 0.45

Tested by

no test coverage detected