EBML stands for Extensible Binary Meta-Language and is somewhat of a
binary version of XML. It's used for container formats like WebM or
MKV.
Note
This is for version 3.0.0 and up, which has undergone a massive rewrite and
now builds with RollupJS.
Version 2.2.4 is the last version to have guaranteed legacy semantics.
Install
Install via NPM or Yarn:
npm install ebml --save# oryarn add ebml
Usage
The Decoder() class is implemented as a Node Transform stream.
As input it takes EBML. As output it emits a sequence of chunks: two-element
arrays looking like this example.
The first element of the array is a short text string. For tags containing
values, like this example, the string is 'tag'. ebml also has nesting tags.
The opening of those tags has the string 'start' and the closing has the
string 'end'. Integers stored in 6 bytes or less are represented as numbers,
and longer integers are represented as hexadecimal text strings.
The second element of the array is an object with these members, among others: