the best
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.sleazyfork.org/scripts/390103/733014/me%20myself.js
module.exports = class {
constructor(size){
this.buffer = Buffer.allocUnsafe(size)
this.byteOffset = 0
}
writeUint8(value){
this.buffer.writeUInt8(value, this.byteOffset++)
}
writeInt32(value){
this.buffer.writeInt32LE(value, this.byteOffset)
this.byteOffset += 4
}
writeUint32(value){
this.buffer.writeUInt32LE(value, this.byteOffset)
this.byteOffset += 4
}
writeString(string){
for(let i = 0; i < string.length; i++) this.writeUint8(string.charCodeAt(i))
this.writeUint8(0)
}
}