(bytes: Uint8Array, encoding: string)
| 55 | return this.textEncoder.encode(text); |
| 56 | } |
| 57 | decode(bytes: Uint8Array, encoding: string): string { |
| 58 | return new TextDecoder(encoding).decode(bytes); |
| 59 | } |
| 60 | |
| 61 | // If the setTimeout nesting level is greater than 5 and timeout is less |
| 62 | // than 4ms, timeout will be clamped to 4ms, which hurts the perf. |