import * as zlib from "zlib";
export 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);
                }
            });
        });
    }
}
//# sourceMappingURL=gzip.js.map