(buffer: Uint8Array, x: Uint8Array)
| 196 | } |
| 197 | |
| 198 | #setBuffer(buffer: Uint8Array, x: Uint8Array): Uint8Array { |
| 199 | if (buffer.length < x.length) buffer = new Uint8Array(x.length); |
| 200 | buffer.set(x); |
| 201 | return buffer.subarray(0, x.length); |
| 202 | } |
| 203 | |
| 204 | #setString(buffer: Uint8Array, x: string): Uint8Array { |
| 205 | if (buffer.length < x.length * 3) buffer = new Uint8Array(x.length * 3); |