mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-06 03:50:18 +02:00
refactor: performance optimizations
also renamed some internal types, and adding more code comments. (not thoroughly tested yet)
This commit is contained in:
parent
65b8671b66
commit
8223d79886
49 changed files with 932 additions and 767 deletions
|
@ -88,5 +88,7 @@ export function encodeUtf8(input: string): Uint8Array {
|
|||
}
|
||||
|
||||
export function decodeUtf8(buffer: ArrayBufferView | ArrayBuffer): string {
|
||||
// `TextDecoder` has internal states in stream mode,
|
||||
// but we don't use stream mode here, so it's safe to reuse the instance
|
||||
return Utf8Decoder.decode(buffer);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue