UNPKG

@alinex/datastore

Version:

Read, work and write data structures from and to differents locations and formats.

17 lines 749 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.compress = exports.uncompress = void 0; const path_1 = require("path"); const debug_1 = require("debug"); // @ts-ignore const compressjs_1 = require("compressjs"); const debug = debug_1.default('datastore:compression:gzip'); exports.uncompress = (async function (parsedUri, buffer, options) { debug(`uncompressing ${path_1.basename(parsedUri.pathname)}`); return Buffer.from(compressjs_1.Bzip2.decompressFile(buffer)); }); exports.compress = (async function (parsedUri, buffer, options) { debug(`compressing ${path_1.basename(parsedUri.pathname)}`); return Buffer.from(compressjs_1.Bzip2.compressFile(buffer)); }); //# sourceMappingURL=bzip2.js.map