(str)
| 117 | } |
| 118 | |
| 119 | writeLString(str) { |
| 120 | const len = Buffer.byteLength(str, 'utf8'); |
| 121 | const buf = utils.allocBufferUnsafe(4 + len); |
| 122 | buf.writeInt32BE(len, 0); |
| 123 | buf.write(str, 4, buf.length-4, 'utf8'); |
| 124 | this.add(buf); |
| 125 | } |
| 126 | |
| 127 | writeStringList(values) { |
| 128 | this.writeShort(values.length); |