antelle / node-stream-zip

node.js library for fast reading of large ZIPs
Other
447 stars 63 forks source link

Getting entries for a specific folder within the zip file? #90

Open warpdesign opened 2 years ago

warpdesign commented 2 years ago

I am attempting to add zip support for react-explorer and would have the need to get the entries for a specific directory within a zip file, something like: zip.entries('path/into/zip/file'), but not recursive.

Is it possible? I did not see any API for that. I know I could do that with existing entries function, but this would require quite some work and I am not sure it would be fast enough if the archive has lots of files/folders.

warpdesign commented 2 years ago

After looking at the ZIP format specs & the node-stream source code I guess there's no way to access directly a file this way so I'll have to do my own code anyway.