Compares two Uint8Arrays for byte-by-byte equality.
Returns true only if both arrays have the same length and identical bytes at every position. Useful for comparing binary data, hashes, etc.
First Uint8Array to compare
Second Uint8Array to compare
True if arrays are equal, false otherwise
const a = new Uint8Array([1, 2, 3]);const b = new Uint8Array([1, 2, 3]);const c = new Uint8Array([1, 2, 4]);UInt8ArrayEqual(a, b); // trueUInt8ArrayEqual(a, c); // false Copy
const a = new Uint8Array([1, 2, 3]);const b = new Uint8Array([1, 2, 3]);const c = new Uint8Array([1, 2, 4]);UInt8ArrayEqual(a, b); // trueUInt8ArrayEqual(a, c); // false
Compares two Uint8Arrays for byte-by-byte equality.
Returns true only if both arrays have the same length and identical bytes at every position. Useful for comparing binary data, hashes, etc.