blob: ca980642c07f35e4f142d0d233ad712211586103 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# Class: DecodeUTF8
Streaming UTF-8 decoding
## Hierarchy
* **DecodeUTF8**
## Index
### Constructors
* [constructor](decodeutf8.md#constructor)
### Properties
* [ondata](decodeutf8.md#ondata)
### Methods
* [push](decodeutf8.md#push)
## Constructors
### constructor
\+ **new DecodeUTF8**(`cb?`: [StringStreamHandler](../README.md#stringstreamhandler)): [DecodeUTF8](decodeutf8.md)
Creates a UTF-8 decoding stream
#### Parameters:
Name | Type | Description |
------ | ------ | ------ |
`cb?` | [StringStreamHandler](../README.md#stringstreamhandler) | The callback to call whenever data is decoded |
**Returns:** [DecodeUTF8](decodeutf8.md)
## Properties
### ondata
• **ondata**: [StringStreamHandler](../README.md#stringstreamhandler)
The handler to call whenever data is available
## Methods
### push
▸ **push**(`chunk`: Uint8Array, `final?`: boolean): void
Pushes a chunk to be decoded from UTF-8 binary
#### Parameters:
Name | Type | Description |
------ | ------ | ------ |
`chunk` | Uint8Array | The chunk to push |
`final?` | boolean | Whether this is the last chunk |
**Returns:** void
|