Function: readStz2()
ts
function readStz2(cursor): CompactSampleSizeBox;Defined in: readers/readStz2.ts:25
Read the stz2 box (CompactSampleSizeBox).
ISO/IEC 14496-12:2015 - 8.7.3
The reader reads entries of 4, 8, or 16 bits. For another field_size, entrySize is empty.
Parameters
cursor
The read cursor at the first byte after the box header
Returns
A parsed CompactSampleSizeBox
Example
ts
const bytes = boxBytes('stz2', [0, 1], [0, 3], [0, 3], [8, 1], [2, 4], [5, 1], [6, 1])
const [box] = readIsoBoxes(bytes, { readers: { stz2: readStz2 } })
assert.ok(isIsoBoxType('stz2', box))
assert.strictEqual(box.fieldSize, 8)
assert.deepStrictEqual(box.entrySize, [5, 6])