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

Function equalBytes

packages/effect/src/eventlog/EventLogEncryption.ts:101–107  ·  view source on GitHub ↗
(a: Uint8Array, b: Uint8Array)

Source from the content-addressed store, hash-verified

99}
100
101const equalBytes = (a: Uint8Array, b: Uint8Array): boolean => {
102 if (a.byteLength !== b.byteLength) return false
103 for (let i = 0; i < a.byteLength; i++) {
104 if (a[i] !== b[i]) return false
105 }
106 return true
107}
108
109const BatchFromSchemaBinary = SchemaBinary.toCodec(Schema.NonEmptyArray(EntryFields))
110const encodeBatch = Schema.encodeEffect(BatchFromSchemaBinary)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected