me myself

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)
    }
}