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

Function decodeUtf8

packages/effect/src/encoding/SchemaBinary.ts:1294–1303  ·  view source on GitHub ↗
(
  buf: Uint8Array,
  start: number,
  end: number,
  options: SchemaAST.ParseOptions | undefined
)

Source from the content-addressed store, hash-verified

1292}
1293
1294function decodeUtf8(
1295 buf: Uint8Array,
1296 start: number,
1297 end: number,
1298 options: SchemaAST.ParseOptions | undefined
1299): string {
1300 const out = Utf8.decode(buf, start, end)
1301 if (out === undefined) invalid("utf-8", undefined, options)
1302 return out
1303}
1304
1305const OUTPUT_ARENA_SIZE = 64 * 1024
1306

Callers 1

readUtf8Method · 0.70

Calls 2

invalidFunction · 0.70
decodeMethod · 0.45

Tested by

no test coverage detected