mirror of
https://github.com/codedread/bitjs
synced 2025-10-04 01:59:15 +02:00
Start on issue #29: Add a Zipper that can take multiple files and produce a zip file as an array of bytes (storage only, no compression)
This commit is contained in:
parent
7389b71cf9
commit
c0afe7637e
5 changed files with 447 additions and 2 deletions
|
@ -73,7 +73,9 @@ const BIT = [0x01, 0x02, 0x04, 0x08,
|
|||
0x1000, 0x2000, 0x4000, 0x8000];
|
||||
|
||||
class ZipLocalFile {
|
||||
// takes a ByteStream and parses out the local file information
|
||||
/**
|
||||
* @param {bitjs.io.ByteStream} bstream
|
||||
*/
|
||||
constructor(bstream) {
|
||||
if (typeof bstream != typeof {} || !bstream.readNumber || typeof bstream.readNumber != typeof function () { }) {
|
||||
return null;
|
||||
|
@ -734,7 +736,6 @@ onmessage = function (event) {
|
|||
bytestream = new bitjs.io.ByteStream(bytes);
|
||||
} else {
|
||||
bytestream.push(bytes);
|
||||
// TODO: Shouldn't this return here if it's not waiting?
|
||||
}
|
||||
|
||||
if (unarchiveState === UnarchiveState.NOT_STARTED) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue