ENCODING!! and lots of organization

This commit is contained in:
2023-09-13 14:50:27 -05:00
parent 2ab90d0146
commit fa0160fc54
37 changed files with 651 additions and 222 deletions
@@ -0,0 +1,10 @@
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);
return chunk(0x0006, buf, false);
};