feat: refactoring project
This commit is contained in:
16
node_modules/@webassemblyjs/leb128/lib/leb.js
generated
vendored
16
node_modules/@webassemblyjs/leb128/lib/leb.js
generated
vendored
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user