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

Function writeTimestamp

packages/effect/src/encoding/Zip.ts:950–956  ·  view source on GitHub ↗
(bytes: Uint8Array, view: DataView, at: number, record: EntryRecord)

Source from the content-addressed store, hash-verified

948const timestampLength = (record: EntryRecord): number => record.seconds === undefined ? 0 : 9
949
950const writeTimestamp = (bytes: Uint8Array, view: DataView, at: number, record: EntryRecord): void => {
951 if (record.seconds === undefined) return
952 view.setUint16(at, EXTRA_TIMESTAMP, true)
953 view.setUint16(at + 2, 5, true)
954 bytes[at + 4] = 1
955 view.setUint32(at + 5, record.seconds, true)
956}
957
958const localHeader = (record: EntryRecord): Uint8Array => {
959 const { zip64 } = record

Callers 2

localHeaderFunction · 0.85
centralHeaderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected