My favorites | Sign in
bitjs
Binary Tools for JavaScript
Project Home Wiki Issues Source
Summary   People
Project Information
  • Project feeds
  • Code license
  • MIT License
  • Labels
    javascript, web, Library, Toolkit
Members
    codedr...@gmail.com
  • 1 committer
Links
  • External links
  • Typed Arrays
  • Web Workers

Introduction

A set of tools to handle binary data in JS (using Typed Arrays).

Example Usage

bitjs.io

This namespace includes stream objects for reading and writing binary data at the bit and byte level: BitStream, ByteStream.

var bstream = new bitjs.io.BitStream(someArrayBuffer, true, offset, length);
var crc = bstream.readBits(12); // read in 12 bits as CRC, advancing the pointer
var flagbits = bstream.peekBits(6); // look ahead at next 6 bits, but do not advance the pointer

bitjs.archive

This namespace includes objects for unarchiving binary data in popular archive formats (zip, rar, tar) providing unzip, unrar and untar capabilities via JavaScript in the browser. The unarchive code depends on browser support of Web Workers. See the design doc.

function updateProgressBar(e) { ... update UI element ... }
function displayZipContents(e) { ... display contents of the extracted zip file ... }

var unzipper = new bitjs.archive.Unzipper(zipFileArrayBuffer);
unzipper.addEventListener("progress", updateProgressBar);
unzipper.addEventListener("finish", displayZipContents);
unzipper.start();
Powered by Google Project Hosting
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.