Closed alunny closed 12 years ago
That sounds pretty much exactly right, and basically the same thing that node-tar does. Yes, documentation would be super duper rad.
Note: a lot about fstream will change when I eventually port it to use the new 0.10-style node streams. Check out the action on https://github.com/isaacs/readable-stream or https://github.com/joyent/node/commits/streams2
Cool.
I still need to work on the other direction (DirectoryReader -> ZipStream), but I'll work on a doc after that.
fstream
is awesome. I'm working on a zip/unzip module that interoperates with it - http://github.com/alunny/zstreamI've gotten unzip to work with the Directory Writer stream - just wondering if I'm missing anything obvious I need to implement, or if I'm making any assumptions about this.
For unzipping, I have a stream called
UnzipStream
that emitsentry
events withFileEntry
objects.UnzipStream patches pipe like so:
Each FileEntry has a
path
property and aprops
property. Then it acts as a regular readable stream (decompressing the content) that gets written to a new FileEntry.Does that all sound sane? I can write up a doc for using other libraries with fstream if this is generally useful.