mirror of
https://gitlab.com/skysthelimit.dev/selenite.git
synced 2025-06-17 11:02:08 -05:00
15 lines
503 B
JavaScript
15 lines
503 B
JavaScript
'use strict';
|
|
var USE_TYPEDARRAY = (typeof Uint8Array !== 'undefined') && (typeof Uint16Array !== 'undefined') && (typeof Uint32Array !== 'undefined');
|
|
|
|
var pako = require("pako");
|
|
exports.uncompressInputType = USE_TYPEDARRAY ? "uint8array" : "array";
|
|
exports.compressInputType = USE_TYPEDARRAY ? "uint8array" : "array";
|
|
|
|
exports.magic = "\x08\x00";
|
|
exports.compress = function(input) {
|
|
return pako.deflateRaw(input);
|
|
};
|
|
exports.uncompress = function(input) {
|
|
return pako.inflateRaw(input);
|
|
};
|