* deflate(data[, options]) -> Uint8Array|Array|String * - data (Uint8Array|Array|String): input data to compress. * - options (Object): zlib deflate options. * * Compress `data` with deflate algorithm and `options`. * * Supported options are: * * - level * - windowBits * - memLevel * - st
(input, options)
| 17353 | * ``` |
| 17354 | **/ |
| 17355 | function deflate(input, options) { |
| 17356 | var deflator = new Deflate(options); |
| 17357 | |
| 17358 | deflator.push(input, true); |
| 17359 | |
| 17360 | // That will never happens, if you don't cheat with options :) |
| 17361 | if (deflator.err) { throw deflator.msg; } |
| 17362 | |
| 17363 | return deflator.result; |
| 17364 | } |
| 17365 | |
| 17366 | |
| 17367 | /** |
no test coverage detected