remove binary-parsser lib dependency

This commit is contained in:
2023-09-14 19:47:16 -05:00
parent d443b313cf
commit 016239b3ad
32 changed files with 373 additions and 455 deletions
@@ -2,9 +2,6 @@ const chunk = require('../chunk');
module.exports = (timestamp) => {
const buf = Buffer.alloc(8);
const timestampHigh = timestamp.toString(2).padStart(64, '0').substring(0, 32);
const timestampLow = timestamp.toString(2).padStart(64, '0').substring(32);
buf.writeUInt32LE(parseInt(timestampLow, 2));
buf.writeUInt32LE(parseInt(timestampHigh, 2), 4);
buf.writeBigUInt64LE(BigInt(timestamp));
return chunk(0x0006, buf, false);
};