Interface DecodeStreamOptions

Options for decoding.

interface DecodeStreamOptions {
    encoding?: null | "base64" | "hex";
    maxDepth?: number;
    requirePreferred?: boolean;
}

Hierarchy (View Summary)

Properties

encoding?: null | "base64" | "hex"

If the input is a string, how should it be decoded into a byte stream? Ignored if the input is a Uint8Array.

null
maxDepth?: number

Maximum allowed depth to parse into CBOR structures. This limit is security-relevant for untrusted inputs. May be set to Infinity for trusted inputs, but be careful!

1024
requirePreferred?: boolean

Reject integers and lengths that could have been encoded in a smaller encoding.

false