spocke / moxie-zip Goto Github PK
View Code? Open in Web Editor NEWYet another zip library
Yet another zip library
Hi, the new changes to the library look great. Can you publish them to npm?
Thank you.
the sample code on the home page doesn't work as
mtime become a number after
entry.mtime.getHours(); // line 155
calling zip.toBuffer() will call entry.mtime.getHours() again
will throw an error
Problem:
saveAs function throws file read failed error
Reason:
toBuffer function use 'fs' module sync function to read file, but donnot try/catch the error or other error handler.
Although there is a callback(error) function in arguments, but still need developer to try/catch the saveAs function.
I think it's maybe a bug.
I ran into issues zipping some .js files that have characters such as λ in them. Are these indeed not supported at the moment? If so, while I don't speak ZIP, I will try to add this and PR it -- IF you can confirm that it wouldn't be a can of worms and that you would accept such PR.
Please let me know...
Thanks!
If you try to include an empty file in a zip file, the file becomes a directory instead.
This is because
https://github.com/spocke/moxie-zip/blob/master/lib/ZipWriter.js#L287
checks the length of the file data, which may be zero for an empty file.
I suggest you change the check to:
if (entry.isFile !== false)
as isFile is set explicitly to false by addDirectory(). This will allow files with no data to be added to the output zip file correctly (as files).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.