binary-tools.js

  • Parse bfloat16, float16 and more
  • Parse integers from 8 to 1024-bit and more
  • Parse UTF-8, UTF-16 and UTF-32 strings
  • Zero dependencies
  • Fully tested
↪ Download now CC-BY-NC-ND-4.0 ↪ Run the browser tests
binary-tools-2.0.0.tgz CC-BY-NC-ND-4.0 SHA-1: c1108570f2812ad1b36e9ac36ba6ba27ff811355 MD5: d18a6d3b04333ba178ccb62d4d52e7dc

Dealing with
bytes should be a pleasure.

binary-tools.js eases the task of dealing with raw binary data by using a simple interface built upon conventions you are likely to be already familiar with and a extensive list of real-world types. Read the documentation for binary-tools.js to check its features.

Dealing with buffers should be a pleasure.

binary-tools.js eases the task of dealing with raw binary data by using a simple interface built upon conventions you are likely to be already familiar with and a extensive list of real-world types.

Free in the true sense of free software.

This software is available under a range of open-source licenses - meaning that after buying it you can have full access to its source code and deal with it with all the freedom granted by those licenses, including developing it yourself and sharing your work with the world.

It supports an extensive list of types.

Modern applications need way more than the common types supported by standard libraries - binary-tools.js have native support for huge integers, not-so-common types used in media files, novel data types used in AI development and cryptic types used on legacy software and hardware - all using the same codebase.

binary-tools.js is built for safety and speed, with a API that suits both reading and writing a few bytes of structured data or huge streams of bytes, as in the case of media files.

It works everywhere.

While the source code of this software is developed using the latest patterns and features of present day JavaScript, it is built so that it may be compiled/transpiled to work in any environment with JavaScript support, including some extremely outdated engines.

No black-box approach.

binary-tools.js relies on standard math (and some bit shifting) to perform all of its operations. It is blazing fast, safe and clear on its approach to reading and writing binary data. All parsers are stand-alone classes that perform their tasks using clear language, well defined steps and very little language-specific features (or none at all), meaning that you can always be absolutely sure about whats going on under the hood, and also that porting any of its functionality to other languages or environments, for example, should be as easy as copying, pasting and changing the syntax.

Tested to exhaustion.

There is no such thing as "enough" when it comes to testing. No release comes until the source code is 100% tested - lines, functions, branches, everything must be 100%. If I'm able to test all possible inputs, I'll do it. If I'm not able to test all possible inputs, I'll sample the most inputs I can, always using diverse and reliable sources. Adding tests is a continuous process, and if a bug is found I'm proud to show both the bug and the bugfix to the world.