2 var USE_TYPEDARRAY = (typeof Uint8Array !== 'undefined') && (typeof Uint16Array !== 'undefined') && (typeof Uint32Array !== 'undefined');
4 var pako = require("pako");
5 exports.uncompressInputType = USE_TYPEDARRAY ? "uint8array" : "array";
6 exports.compressInputType = USE_TYPEDARRAY ? "uint8array" : "array";
8 exports.magic = "\x08\x00";
9 exports.compress = function(input, compressionOptions) {
10 return pako.deflateRaw(input, {
11 level : compressionOptions.level || -1 // default compression
14 exports.uncompress = function(input) {
15 return pako.inflateRaw(input);