Fully move to protobufjs

This commit is contained in:
Fedor Indutny 2021-07-13 11:54:53 -07:00 committed by GitHub
parent 20ea409d9e
commit 570fb182d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 1133 additions and 12401 deletions

View file

@ -54,4 +54,15 @@ export class Bytes {
public isNotEmpty(data: Uint8Array | null | undefined): data is Uint8Array {
return !this.isEmpty(data);
}
public areEqual(
a: Uint8Array | null | undefined,
b: Uint8Array | null | undefined
): boolean {
if (!a || !b) {
return !a && !b;
}
return Buffer.compare(a, b) === 0;
}
}