(str: string)
| 70 | this.i += 1; |
| 71 | } |
| 72 | writeString8(str: string) { |
| 73 | const encode = new TextEncoder().encode(str); |
| 74 | this.write8(encode.length); |
| 75 | for (const thing of encode) { |
| 76 | this.write8(thing); |
| 77 | } |
| 78 | } |
| 79 | writeString16(str: string) { |
| 80 | const encode = new TextEncoder().encode(str); |
| 81 | this.write16(encode.length); |