package
High-level I/O for binary data.
npm install jbinaryGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
jBinary
jBinary makes it easy to create, load, parse, modify and save complex binary files and data structures in both browser and Node.js.
It works on top of jDataView (DataView polyfill with convenient extensions).
Was inspired by jParser and derived as new library with full set of operations for binary data.
Typical scenario:
Check out wiki for detailed API documentation.
How about TAR archive modification:
// configuring paths for Require.js
// (you can use CommonJS (Component, Node.js) or simple script tags as well)
require.config({
paths: {
jdataview: 'https://jdataview.github.io/dist/jdataview',
jbinary: 'https://unpkg.com/jbinary@2.1.3/dist/browser/jbinary',
TAR: 'https://jdataview.github.io/jBinary.Repo/typeSets/tar' // TAR archive typeset
}
});
require(['jbinary', 'TAR'], function (jBinary, TAR) {
// loading TAR archive with given typeset
jBinary.load('sample.tar', TAR).then(function (jb/* : jBinary */) {
// read everything using type aliased in TAR['jBinary.all']
var files = jb.readAll();
// do something with files in TAR archive (like rename them to upper case)
Advanced demo that shows abilities and performance of jBinary - Apple HTTP Live Streaming player which converts MPEG-TS video chunks from realtime stream to MP4 and plays them immediately one by one while converting few more chunks in background.
A World of Warcraft Model Viewer. It uses jDataView+jBinary to read the binary file and then WebGL to display it.

Also check out jBinary.Repo for advanced usage and demos of some popular file formats (and feel free to submit more!).
This library is provided under MIT license.
Estimated unpacked size across 37 packages.
6.4 MB
Includes dependencies.