* 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)
| 5696 | * ``` |
| 5697 | **/ |
| 5698 | function deflate(input, options) { |
| 5699 | var deflator = new Deflate(options); |
| 5700 | |
| 5701 | deflator.push(input, true); |
| 5702 | |
| 5703 | // That will never happens, if you don't cheat with options :) |
| 5704 | if (deflator.err) { throw deflator.msg; } |
| 5705 | |
| 5706 | return deflator.result; |
| 5707 | } |
| 5708 | |
| 5709 | |
| 5710 | /** |
no test coverage detected