bower / decompress-zip

Module that decompresses zip files
MIT License
102 stars 76 forks source link

Public API #2

Closed satazor closed 11 years ago

satazor commented 11 years ago

I don't think we should expose promises. While promises can be used inside, they should not be used in the API as per node standards.

Also, I think extract should return a stream or a event-emitter, similar to node-tar emitting data resulted from the parse of the zip (entries, etc). The regular end and close events would be fired: end for done, close for done + finish writing to disk.

wibblymat commented 11 years ago

I could output an event emitter, I suppose. Perhaps with a file event which will give you the metadata for the file and a ReadableStream of the contents. A stream doesn't seem right though. How do you send multiple files and their metadata in one stream without forcing the user to basically build their own parser?

satazor commented 11 years ago

Yes, data does not make sense since it won't work for multiple files so :+1: for file and return EventEmitter.