ProductPromotion
Logo

Java.Script

made by https://0x3d.site

GitHub - jDataView/jBinary: High-level API for working with binary data.
High-level API for working with binary data. Contribute to jDataView/jBinary development by creating an account on GitHub.
Visit Site

GitHub - jDataView/jBinary: High-level API for working with binary data.

GitHub - jDataView/jBinary: High-level API for working with binary data.

Build Status NPM version jBinary

![Gitter](https://badges.gitter.im/Join Chat.svg)

Binary data in JavaScript is easy!

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.

How can I use it?

Typical scenario:

  • Describe typeset with JavaScript-compatible declarative syntax (jBinary will do type caching for you).
  • Create jBinary instance from memory or from data source and your typeset.
  • Read/write data just as native JavaScript objects!

API Documentation.

Check out wiki for detailed API documentation.

Is there any example code?

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/[email protected]/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)
    files.forEach(function (file) {
      file.name = file.name.toUpperCase();
    });

    jb.writeAll(files, 0); // writing entire content from files array
    jb.saveAs('sample.new.tar'); // saving file under given name
  });
});

Run or edit it on JSBin.

Show me amazing use-cases!

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.

Screenshot


A World of Warcraft Model Viewer. It uses jDataView+jBinary to read the binary file and then WebGL to display it.

Screenshot

Also check out jBinary.Repo for advanced usage and demos of some popular file formats (and feel free to submit more!).

What license is it issued under?

This library is provided under MIT license.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory