gzip.js 613 B

1234567891011
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.ungzip = exports.gzip = void 0;
  4. const fromStream_1 = require("../streams/fromStream");
  5. const toStream_1 = require("../streams/toStream");
  6. const pipeThrough = async (data, transform) => await (0, fromStream_1.fromStream)((0, toStream_1.toStream)(data).pipeThrough(transform));
  7. const gzip = async (data) => await pipeThrough(data, new CompressionStream('gzip'));
  8. exports.gzip = gzip;
  9. const ungzip = async (data) => await pipeThrough(data, new DecompressionStream('gzip'));
  10. exports.ungzip = ungzip;
  11. //# sourceMappingURL=gzip.js.map