decodeutf8.md 1.1 KB

Class: DecodeUTF8

Streaming UTF-8 decoding

Hierarchy

  • DecodeUTF8

Index

Constructors

Properties

Methods

Constructors

constructor

+ new DecodeUTF8(cb?: StringStreamHandler): DecodeUTF8

Creates a UTF-8 decoding stream

Parameters:

Name Type Description
cb? StringStreamHandler The callback to call whenever data is decoded

Returns: DecodeUTF8

Properties

ondata

ondata: 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