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

Function writeString

packages/effect/src/encoding/Tar.ts:878–881  ·  view source on GitHub ↗
(block: Uint8Array, offset: number, length: number, value: string)

Source from the content-addressed store, hash-verified

876const MAX_OCTAL_11 = 0o77777777777 // 12-byte numeric fields
877
878const writeString = (block: Uint8Array, offset: number, length: number, value: string): void => {
879 const n = Math.min(value.length, length)
880 for (let i = 0; i < n; i++) block[offset + i] = value.charCodeAt(i)
881}
882
883// Writes `length - 1` zero-padded octal digits; the value must fit
884const writeOctal = (block: Uint8Array, offset: number, length: number, value: number): void => {

Callers 2

paxRecordFunction · 0.85
writeUstarBlockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected