Initial commit

This commit is contained in:
talksik
2021-12-29 01:57:42 -08:00
commit ce39a60b42
4634 changed files with 997667 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
const MAX_INT32 = Math.pow(2, 32)
module.exports = (value, buf = Buffer.allocUnsafe(8)) => {
const high = Math.floor(value / MAX_INT32)
const low = value % MAX_INT32
buf.writeUInt32BE(high, 0)
buf.writeUInt32BE(low, 4)
return buf
}