1
0
Fork 0
mirror of https://github.com/codedread/bitjs synced 2025-10-03 17:49:16 +02:00

Accidentally didn't add the updated files.

This commit is contained in:
Jeff Schiller 2016-04-19 18:00:27 -07:00
parent 2ad36ea0c5
commit 1f76d76115
2 changed files with 31 additions and 3 deletions

View file

@ -0,0 +1,8 @@
The MIT License (MIT)
Copyright (c) 2011 Google Inc, antimatter15
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -1,5 +1,25 @@
bitjs: Binary Tools for JavaScript # bitjs: Binary Tools for JavaScript
==================================
Automatically exported from code.google.com/p/bitjs ## 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(); ```
## History
This repository was automatically exported from code.google.com/p/bitjs and then I cherry-picked some commits from antimatter15's fork.