feat: refactoring project

This commit is contained in:
Carlos
2024-11-23 14:56:07 -05:00
parent f0c2a50c18
commit 1c6db5818d
2351 changed files with 39323 additions and 60326 deletions

View File

@@ -222,10 +222,12 @@ function decodeIntBuffer(encodedBuffer, index) {
}
function encodeInt32(num) {
var buf = bufs.alloc(4);
buf.writeInt32LE(num, 0);
var buf = new Uint8Array(4);
buf[0] = num & 0xff;
buf[1] = num >> 8 & 0xff;
buf[2] = num >> 16 & 0xff;
buf[3] = num >> 24 & 0xff;
var result = encodeIntBuffer(buf);
bufs.free(buf);
return result;
}
@@ -282,10 +284,12 @@ function decodeUIntBuffer(encodedBuffer, index) {
}
function encodeUInt32(num) {
var buf = bufs.alloc(4);
buf.writeUInt32LE(num, 0);
var buf = new Uint8Array(4);
buf[0] = num & 0xff;
buf[1] = num >> 8 & 0xff;
buf[2] = num >> 16 & 0xff;
buf[3] = num >> 24 & 0xff;
var result = encodeUIntBuffer(buf);
bufs.free(buf);
return result;
}