Home Reference Source Test
import EncodeHelper from 'osc-js/src/common/helpers.js'
public class | source

EncodeHelper

Holds a list of items and helps to merge them into a single array of packed binary data

Test:

Constructor Summary

Public Constructor
public

Create a new EncodeHelper instance

Member Summary

Public Members
public
public

data: array

Method Summary

Public Methods
public

add(item: *): EncodeHelper

Packs an item and adds it to the list

public

Merge all added items into one Uint8Array

Public Constructors

public constructor() source

Create a new EncodeHelper instance

Public Members

public byteLength: number source

public data: array source

Public Methods

public add(item: *): EncodeHelper source

Packs an item and adds it to the list

Params:

NameTypeAttributeDescription
item *

Any object

Return:

EncodeHelper

public merge(): Uint8Array source

Merge all added items into one Uint8Array

Return:

Uint8Array

Merged binary data array of all items