1
0
Fork 0
mirror of https://github.com/codedread/bitjs synced 2025-10-03 09:39:16 +02:00
No description
Find a file
2017-02-18 01:41:42 -08:00
docs Add RAR format docs from kthoom 2017-02-15 21:24:49 -08:00
io Update docs for BitStream.getBits() and add a TODO 2017-02-18 01:41:42 -08:00
archive.js Add ability to stop an Unarchiver and terminate its worker 2014-06-12 01:10:12 -05:00
drive.html Apply beaufort.francois patch to correct typo 2014-05-22 00:57:12 -07:00
LICENSE Accidentally didn't add the updated files. 2016-04-19 18:00:27 -07:00
muther.js Add signed number read/write methods to byte stream and buffer. Add a few unit tests 2014-03-19 00:14:08 -07:00
README.md Accidentally didn't add the updated files. 2016-04-19 18:00:27 -07:00
unrar.js Split up io like antimatter15 did 2017-02-15 21:19:57 -08:00
untar.js Split up io like antimatter15 did 2017-02-15 21:19:57 -08:00
unzip.js Split up io like antimatter15 did 2017-02-15 21:19:57 -08:00

bitjs: Binary Tools for JavaScript

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.


var unzipper = new bitjs.archive.Unzipper(zipFileArrayBuffer); unzipper.addEventListener("progress", updateProgressBar); unzipper.addEventListener("finish", displayZipContents); unzipper.start(); ```

## History

This repository was automatically exported from code.google.com/p/bitjs and then I cherry-picked some commits from antimatter15's fork.