Fix the gzip level for image uploads to a good perf/size balance

This commit is contained in:
Tim Perry 2017-06-14 17:42:33 +02:00
parent df3c5ca07f
commit cf7bf2cb7d
2 changed files with 6 additions and 2 deletions

View File

@ -113,7 +113,9 @@ performUpload = function(imageStream, token, username, url, appName, logStreams)
auth: {
bearer: token
},
body: streamWithProgress.pipe(zlib.createGzip())
body: streamWithProgress.pipe(zlib.createGzip({
level: 6
}))
});
return uploadToPromise(uploadRequest, logStreams);
};

View File

@ -80,7 +80,9 @@ performUpload = (imageStream, token, username, url, appName, logStreams) ->
'Content-Encoding': 'gzip'
auth:
bearer: token
body: streamWithProgress.pipe(zlib.createGzip())
body: streamWithProgress.pipe(zlib.createGzip({
level: 6
}))
uploadToPromise(uploadRequest, logStreams)