optional compression

This commit is contained in:
v 2018-11-29 19:49:42 +03:00
parent 818c344d2f
commit 2f05ae3cea

View File

@ -474,6 +474,8 @@ class ClusterPool {
}
isCompressible ( mimeType, data, id ) {
if ( ! argv.compress )
return false
if ( data == null || data.length == 0 )
return false
if ( !mimeType ) {
@ -1576,6 +1578,7 @@ function main () {
// Extra arguments:
.option( '--optimg', 'optimise images' )
.option( '--jpegquality <factor>', 'JPEG quality', parseInt, 60 )
.option( '--no-compress', "do not compress clusters" )
.parse( process.argv )
log( argv )