yazl icon indicating copy to clipboard operation
yazl copied to clipboard

Option for addBuffer to compress if smaller?

Open AlexanderOMara opened this issue 5 years ago • 0 comments

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'
});

AlexanderOMara avatar Aug 15 '19 02:08 AlexanderOMara