Closed RoryDungan closed 8 years ago
Yeah, looks like you're hitting the Node.js Buffer limit.
Might be able to work around that by using the gulp stream mode here instead of concating the resulting stream: https://github.com/sindresorhus/gulp-zip/blob/0772beae388e356489709f39444acefdb40e1950/index.js#L58
But I don't have time to look into it right now, so PR welcome.
Docs: https://github.com/gulpjs/gulp/blob/master/docs/writing-a-plugin/dealing-with-streams.md
Yeah, after this I had a look at a couple of other Node.js zip libraries and it definitely is to do with the Node buffer since they all also have the same problem. Thanks for that link though, I'll have a look into that.
Trying to zip a file 1GB or larger fails with the following error:
This is easily reproducible by creating a 1GB file ("truncate -s 1024M output.file" is probably the quickest way to test this Linux/OSX/Cygwin) and running gulp-zip on that directory. Multiple files just under 1GB work just fine, so it's definitely the size of each input file, not the combined size.