yazl
yazl copied to clipboard
Option for addBuffer to compress if smaller?
It would be nice to have an option to have addBuffer
compress the buffer if that makes the resulting file smaller.
I'm not sure it would really work for addFile
but it would for addBuffer
because the entire buffer is available at once.
I can make the pull request if the API can be decided on. Maybe one of the following?
addBuffer(buffer, path, {
compress: null
});
addBuffer(buffer, path, {
compress: 'auto'
});
addBuffer(buffer, path, {
compress: 'smaller'
});