Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9d05172

Browse files
sokrajoshwiens
authored andcommitted
feat: Add compression level option
1 parent 1f3b595 commit 9d05172

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

index.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,15 @@ function CompressionPlugin(options) {
3232
var zlib = require("zlib");
3333
this.algorithm = zlib[this.algorithm];
3434
if(!this.algorithm) throw new Error("Algorithm not found in zlib");
35-
this.algorithm = this.algorithm.bind(zlib);
35+
this.algorithm = this.algorithm.bind(zlib, {
36+
level: options.level || 9,
37+
flush: options.flush,
38+
chunkSize: options.chunkSize,
39+
windowBits: options.windowBits,
40+
memLevel: options.memLevel,
41+
strategy: options.strategy,
42+
dictionary: options.dictionary
43+
});
3644
}
3745
}
3846
this.regExp = options.regExp;

0 commit comments

Comments
 (0)