Class DecodeStream

Decode bytes into a stream of events describing the CBOR read from the bytes. Currently requires a full single CBOR value, with no extra bytes in the input.

Implements

Constructors

Properties

Methods

Constructors

Properties

defaultOptions: Required<DecodeStreamOptions> = ...

Methods

  • Get the stream of events describing the CBOR item. Yields Value tuples.

    Returns ValueGenerator

    On invalid input or extra data in input.

    const s = new DecodeStream(buffer);
    for (const [majorType, additionalInfo, value] of s) {
    ...
    }