thejoshwolfe / yazl

yet another zip library for node
MIT License
329 stars 44 forks source link

Maintained ? #58

Closed haseebnaseem closed 4 years ago

haseebnaseem commented 4 years ago

Hi @thejoshwolfe , Is this library still being maintained ?

thejoshwolfe commented 4 years ago

good question. this project is driven by my personal motivation to contribute to the open source community. there was a time when i was maintaining a music player project that depended on this library, which was the original purpose for creating this, but that music player has bitrotted over the years.

I'm aware of the growing number of maintenance issues here and for yauzl, and i simply haven't allocated the time to work on them. will i ever? probably.

i wouldn't say that this project is completely abandoned and unmaintained, but it's certainly not very active. i don't know how to answer your question.

haseebnaseem commented 4 years ago

Fair enough, I actually didn’t want to ask about the issues but an additional feature. Before I continue, I’d like to let you know that I’ve poked around it enough to have some understanding of it how it does what it does. My use case is as follows: I am trying to generate a zip file on the fly using multiple urls and connecting the response pipes as input to the library. While it works fine in the general case I’d like to have an additional feature which is that if In some case one of the my http requests breaks in the middle, say only sent 200 bytes out of the 400, I request the remaining data using range headers and then continue writing to the zip file. I have made some headway regarding this but while the I was able to get the number of bytes to match The normal case, the zip file is corrupted. If this unusual and challenging case peaks your interest I’d be more than happy to share my progress and maybe you’d like to help me reach my goal.

andrewrk commented 4 years ago

This project is basically done. There are actually 0 open bug reports in this project, despite being widely used. All the open issues are one of these things:

haseebnaseem commented 4 years ago

I understand. here is a demo of my use case.

const yazl = require('yazl');
const fs = require('fs');

const file = new yazl.ZipFile();

//create an output stream
ws = fs.createWriteStream('./output.zip');
//pipe the response of yazl to the output stream
file.outputStream.pipe(ws);
// create a read stream to partitally read data
rs = fs.createReadStream('./dummy.txt',{start:0, end: 32});
//add the partial read stream to yazl
file.addReadStream(rs, './dumdum.txt',{compress:false});
// create a read stream to partitally read data
rs = fs.createReadStream('./dummy.txt',{start:33, end:64});
//add the partial read stream to yazl
file.addReadStream(rs, './dumdum.txt',{compress:false});

file.end();

dummy.txt

abcdefghijklmnopqrstuvwxyz
123456789
abcdefghijklmnopqrstuvwxyz

dumdum.txt

789
abcdefghijklmnopqrstuvwxyz
haseebnaseem commented 4 years ago

I have modified the library a bit and achieved my desired result. Closing.