jBinary Constructor (original) (raw)
new jBinary(data, typeSet)
data
is a jDataView or any underlying type (in that casejDataView
will be created with default parameters).typeSet
is your type set - object with all the defined types.
Example
var b1 = new jBinary([0x05, 0x03, 0x7F, 0x1E]); // with default typeset var b2 = new jBinary(new jDataView(data, 5, 10, true), { MetaName: ['string', 30] }); // with custom jDataView instance on data and typeset with custom type MetaName. var b3 = new jBinary(1024, typeSet); // jBinary on empty pre-allocated 1KB buffer with typeSet defined in variable