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

Function hasBytes

packages/effect/src/encoding/Tar.ts:587–592  ·  view source on GitHub ↗
(block: Uint8Array, offset: number, bytes: ReadonlyArray<number>)

Source from the content-addressed store, hash-verified

585const USTAR_MAGIC_VERSION = new Uint8Array([0x75, 0x73, 0x74, 0x61, 0x72, 0x00, 0x30, 0x30]) // "ustar\0" "00"
586
587const hasBytes = (block: Uint8Array, offset: number, bytes: ReadonlyArray<number>): boolean => {
588 for (let i = 0; i < bytes.length; i++) {
589 if (block[offset + i] !== bytes[i]) return false
590 }
591 return true
592}
593
594const typeflags: Record<Exclude<EntryType, "Other">, string> = {
595 File: "0",

Callers 1

parseHeaderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected