UNPKG

721 BTypeScriptView Raw
1/// <reference types="node" />
2import { Nibbles } from '../trieNode';
3/**
4 * Converts a buffer to a nibble array.
5 * @private
6 * @param key
7 */
8export declare function bufferToNibbles(key: Buffer): Nibbles;
9/**
10 * Converts a nibble array into a buffer.
11 * @private
12 * @param arr - Nibble array
13 */
14export declare function nibblesToBuffer(arr: Nibbles): Buffer;
15/**
16 * Returns the number of in order matching nibbles of two give nibble arrays.
17 * @private
18 * @param nib1
19 * @param nib2
20 */
21export declare function matchingNibbleLength(nib1: Nibbles, nib2: Nibbles): number;
22/**
23 * Compare two nibble array keys.
24 * @param keyA
25 * @param keyB
26 */
27export declare function doKeysMatch(keyA: Nibbles, keyB: Nibbles): boolean;