const P32 = 0x100000000 ; /**
 * Hex digits
 */ export const HEX = "0123456789abcdef" ; param x export const U4 = ( x ) => HEX [ x & 0xf ] ; param x export const U8 = ( x ) => HEX [ ( x >>> 4 ) & 0xf ] + HEX [ x & 0xf ] ; param x param i export const U8A = ( x , i ) => U8 ( x [ i ] ) ; param x export const U16 = ( x ) => U8 ( x >>> 8 ) + U8 ( x & 0xff ) ; param x param i export const U16BE = ( x , i ) => U8 ( x [ i ] ) + U8 ( x [ i + 1 ] ) ; param x param i export const U16LE = ( x , i ) => U8 ( x [ i + 1 ] ) + U8 ( x [ i ] ) ; param x export const U24 = ( x ) => U8 ( x >>> 16 ) + U16 ( x ) ; param x param i export const U24BE = ( x , i ) => U8 ( x [ i ] ) + U16BE ( x , i + 1 ) ; param x param i export const U24LE = ( x , i ) => U8 ( x [ i + 2 ] ) + U16LE ( x , i ) ; param x export const U32 = ( x ) => U16 ( x >>> 16 ) + U16 ( x ) ; param x param i export const U32BE = ( x , i ) => U16BE ( x , i ) + U16BE ( x , i + 2 ) ; param x param i export const U32LE = ( x , i ) => U16LE ( x , i + 2 ) + U16LE ( x , i ) ; param x export const U48 = ( x ) => U48HL ( x / P32 , x % P32 ) ; /**
 * Similar to  U48 , but takes the 64bit arg as 2x 32bit values.
 *
 *  param hi param lo export const U48HL = ( hi , lo ) => U16 ( hi ) + U32 ( lo ) ; param x param i export const U48BE = ( x , i ) => U16BE ( x , i ) + U32BE ( x , i + 2 ) ; param x param i export const U48LE = ( x , i ) => U16LE ( x , i + 4 ) + U32LE ( x , i ) ; remarks Note: JS numbers are only integer precise up to `2**53 - 1`. Use
 *  U64BE or  U64LE for byte array based values (full 64bit range
 * supported). Alternatively, use `BigInt(x).toString(16)`.
 *
 *  param x export const U64 = ( x ) => U64HL ( x / P32 , x % P32 ) ; /**
 * Similar to  U64 , but takes the 64bit arg as 2x 32bit values.
 *
 *  param hi param lo export const U64HL = ( hi , lo ) => U32 ( hi ) + U32 ( lo ) ; param x param i export const U64BE = ( x , i ) => U32BE ( x , i ) + U32BE ( x , i + 4 ) ; param x param i export const U64LE = ( x , i ) => U32LE ( x , i + 4 ) + U32LE ( x , i ) ; param id param i export const uuid = ( id , i = 0 ) => `${ U32BE ( id , i ) }-${ U16BE ( id , i + 4 ) }-${ U16BE ( id , i + 6 ) }-${ U16BE ( id , i + 8 ) }-${ U48BE ( id , i + 10 ) }` ;