UNPKG

@davidcal/fec-raptorq

Version:

Node.js wrapper for RaptorQ forward error correction

16 lines (12 loc) 247 B
/** * @stability 2 - provisional */ export const bigint_decode = (bytes) => { let bint = 0n; for (let i = 0; i < bytes.length; i++) { bint <<= 8n; bint += BigInt(bytes[i]); } return bint; }; export const bigintDecode = bigint_decode;