TLV encoder that accepts objects in reverse order.

Constructors

Accessors

  • get output(): Uint8Array
  • Obtain encoding output.

    Returns Uint8Array

  • get size(): number
  • Return encoding output size.

    Returns number

Methods

  • Make room to prepend an object.

    Parameters

    • sizeofObject: number

      Object size.

    Returns Uint8Array

    Room to write object.

  • Prepend TLV structure.

    Parameters

    Returns void

  • Prepend TLV structure, but skip if TLV-VALUE is empty.

    Parameters

    Returns void

  • Prepend TLV-TYPE and TLV-LENGTH.

    Parameters

    • tlvType: number
    • tlvLength: number

    Returns void

  • Prepend TLV-VALUE.

    Parameters

    Returns void

    Elements are prepended in the reverse order, so that they would appear in the output in the same order as the parameter order.