Draft Inverse Bloom Filter

This commit is contained in:
Jim Hamill
2025-01-20 07:47:07 +00:00
parent d6a04f4350
commit 1aebc6da42
21 changed files with 1285 additions and 381 deletions
+2 -2
View File
@@ -52,7 +52,7 @@ export class Bytes {
public static fromBase64(base64: string): Bytes {
// If the Base64 is invalid, throw an error.
if (!isBase64(base64)) {
throw new Error('Invalid base64 string');
throw new Error(`Cannot decode invalid base64 '${base64}'`);
}
return new this(base64ToBin(base64));
@@ -96,7 +96,7 @@ export class Bytes {
public static fromHex(hex: string): Bytes {
// If the hex is invalid, throw an error.
if (!isHex(hex)) {
throw new Error('Invalid hexidecimal string');
throw new Error(`Cannot decode invalid hex '${hex}'`);
}
return new this(hexToBin(hex));