We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1,readme代码跑不起来 UInt8Array实际为Uint8Array,小写i 返回的buffer实际struct.decode无法读取,需要传递buffer.buffer ` import { qs } from "quick-struct";
const struct = qsstruct { u8 a; };
struct { u8 a; }
// Create a UInt8 array const buffer = new UInt8Array([12]);
// Decode buffer const result = struct.decode(buffer).toJson();
// Print decoded result console.log(result.a); `
2,十六进制FF06在i16和u16类型下输出均为1791,实际i16应为-250,无法转换为无符号i16 3,压缩过的核心代码?开源项目?基于2问题想动手修改核心代码来解决问题,结果发现build/index.js是压缩过的,算了,还是自己用DataView包装一下慢慢改吧。
The text was updated successfully, but these errors were encountered:
忘记测试有符号的数据了
github中是保存了源代码的,因为我的项目中不想把源代码集成进去,故而编译后使用
Sorry, something went wrong.
1,readme代码跑不起来 UInt8Array实际为Uint8Array,小写i 返回的buffer实际struct.decode无法读取,需要传递buffer.buffer ` import { qs } from "quick-struct"; const struct = qs` struct { u8 a; } `; // Create a UInt8 array const buffer = new UInt8Array([12]); // Decode buffer const result = struct.decode(buffer).toJson(); // Print decoded result console.log(result.a); ` 2,十六进制FF06在i16和u16类型下输出均为1791,实际i16应为-250,无法转换为无符号i16 3,压缩过的核心代码?开源项目?基于2问题想动手修改核心代码来解决问题,结果发现build/index.js是压缩过的,算了,还是自己用DataView包装一下慢慢改吧。
1,readme代码跑不起来
UInt8Array实际为Uint8Array,小写i
返回的buffer实际struct.decode无法读取,需要传递buffer.buffer
`
import { qs } from "quick-struct";
const struct = qs`
`;
// Create a UInt8 array
const buffer = new UInt8Array([12]);
// Decode buffer
const result = struct.decode(buffer).toJson();
// Print decoded result
console.log(result.a);
2,十六进制FF06在i16和u16类型下输出均为1791,实际i16应为-250,无法转换为无符号i16
3,压缩过的核心代码?开源项目?基于2问题想动手修改核心代码来解决问题,结果发现build/index.js是压缩过的,算了,还是自己用DataView包装一下慢慢改吧。
我新加了decode.test.mjs文件用来测试你说的第2个问题,但是测试结果是正确的,能再说说具体错误吗
No branches or pull requests
1,readme代码跑不起来
UInt8Array实际为Uint8Array,小写i
返回的buffer实际struct.decode无法读取,需要传递buffer.buffer
`
import { qs } from "quick-struct";
const struct = qs
struct { u8 a; }
;// Create a UInt8 array
const buffer = new UInt8Array([12]);
// Decode buffer
const result = struct.decode(buffer).toJson();
// Print decoded result
console.log(result.a);
`
2,十六进制FF06在i16和u16类型下输出均为1791,实际i16应为-250,无法转换为无符号i16
3,压缩过的核心代码?开源项目?基于2问题想动手修改核心代码来解决问题,结果发现build/index.js是压缩过的,算了,还是自己用DataView包装一下慢慢改吧。
The text was updated successfully, but these errors were encountered: