"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const zlib = require("zlib");
class ActiveGZip {
    static gzip(data) {
        return new Promise((resolve, reject) => {
            zlib.gzip(data, (error, data) => {
                if (!error) {
                    resolve(data);
                }
                else {
                    reject(error);
                }
            });
        });
    }
    static ungzip(data) {
        return new Promise((resolve, reject) => {
            zlib.gunzip(data, (error, data) => {
                if (!error) {
                    resolve(data);
                }
                else {
                    reject(error);
                }
            });
        });
    }
}
exports.ActiveGZip = ActiveGZip;
//# sourceMappingURL=gzip.js.map