The `ebml` library provides a JavaScript parser for the Extensible Binary Meta-Language (EBML) format, which is a binary equivalent to XML. It's prominently used in multimedia container formats such as WebM and Matroska (MKV). The library implements a Node.js Transform stream, enabling the decoding of EBML streams into a sequence of JavaScript objects that represent individual EBML elements. The current stable version, 3.0.0, represents a substantial rewrite to ES2018, aligning with modern JavaScript module standards and now builds with RollupJS. The project is actively maintained, with recent updates addressing live streaming issues and prior security releases. Its key differentiator is its efficient stream-based parsing, which is ideal for processing large media files without requiring them to be loaded entirely into memory.
npm install ebmlVerified import paths — ran on the pinned version, not inferred.
Demonstrates streaming EBML data from a file, piping it through the `Decoder` transform stream, and counting the occurrences of each EBML element name as it's parsed. Includes a helper to create a dummy WebM file if none exists to ensure the example is runnable.
Review the usage examples and documentation for v3.x, as code written for v2.x will likely require adaptation. Specifically, update import statements to ES Module syntax.
Adopt ES Module syntax (`import { Decoder } from 'ebml';`) in your projects. If you must use CommonJS, ensure Node.js is configured for interoperability or transpile your code.Migrate to version 3.x and update code to the new API and semantics. Do not rely on undocumented behavior from 2.x releases.
Manually parse `d`-type element values into desired JavaScript timestamp formats, accounting for the `2001-01-01T00:00UTC` epoch.
Implement logic to detect and convert hexadecimal string representations of large integers to `BigInt` or other suitable numerical types if numerical operations are needed.
Change your import statement to `import { Decoder } from 'ebml';` in an ESM context (e.g., `"type": "module"` in `package.json` or a `.mjs` file).Ensure you are using a named import: `import { Decoder } from 'ebml';` and then instantiate with `new Decoder();`.Verify that `fs.createReadStream()` or any other readable stream source is correctly set up and returning a valid stream object before calling `.pipe(ebmlDecoder)`.
No dependency data recorded yet.