Package provides bx and bxx method thar accepts a string containing hex encoded data
and returns an ArrayBuffer or Buffer respectively.
Example 1
Example 1
// Examples of cases when it returns an ArrayBuffer const HEADER = bx('00 ff 00 ff'); // ArrayBuffer { [Uint8Contents]: <00 ff 00 ff>, byteLength: 4 } const SYNC1 = bx('00ff00ff_b4_01020304'); // ArrayBuffer { [Uint8Contents]: <00 ff 00 ff b4 01 02 03 04>, byteLength: 9 } const ZEROLENGTH = bx(''); // ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 }