"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = inflate;

function _zlib() {
  const data = _interopRequireDefault(require("zlib"));

  _zlib = function () {
    return data;
  };

  return data;
}

function inflate(buffer) {
  return new Promise((resolve, reject) => {
    _zlib().default.inflate(buffer, (err, res) => {
      if (err) return reject(err);
      return resolve(res);
    });
  });
}