yazl | yet another zip library for node
kandi X-RAY | yazl Summary
kandi X-RAY | yazl Summary
yet another zip library for node. For unzipping, see yauzl.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of yazl
yazl Key Features
yazl Examples and Code Snippets
Community Discussions
Trending Discussions on yazl
QUESTION
How can I compress/decompress a buffer via yazl? https://www.npmjs.com/package/yazl
I don't want to create/save a zip file but just compress a buffer and forward it to another service. Any sample code would be helpful
...ANSWER
Answered 2019-Feb-14 at 01:34This kind of function should help, manually retrieving the stream's packets, then concatenating them into one single Buffer
:
QUESTION
I am trying to generate large zip file (without compression, just storing the files) on the fly and stream it via restify
. The zip file can be bigger than 4 GiB in total and I ran to issue with ZIP64 format, that seems not to be supported properly on MacOS.
I tried using node-archiver
and yazl
, they are both able to generate the zip file, but I am not able to open it via native graphical utility in MacOS (e.g. just double-clicking on the file in Finder). The weirdest thing about this is, that the native unzip
command line utility works fine here, just the graphical Archive Utility is not working.
I also tried to create the zip using simple java implementation and the resulting file works ok even with the graphical Archive Utility, so the problem is probably in implementation of node-archiver
/yazl
libraries. I also tried to create the zip via command line (zip file.zip -0 ...files
), and it can also be opened via Archive Utility.
What is the correct way to handle this situation? Is there some other node library that can produce ZIP64 format that can be opened via Archive Utility?
It is necessary to stream the zip file, not storing it on disk. I am running latest version of MacOS sierra (10.12.5 beta) and node 6.9.1.
...ANSWER
Answered 2017-May-21 at 17:38If anyone struggles with the same requirements as I did, check JSZip
library (https://stuk.github.io/jszip/). It can also work with node streams and is able to produce zip files larger than 4 GiB, that can be opened via MacOS Archive Utility. The only limitation of this is, that you can not have a file larger than 4 GiB, because of 32 bit CRC32 hash generation (but the zip file can be larger).
Here is a snippet of how you can use this library:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install yazl
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page