modules/UBCompressors/UBCompressors.js

/**
 * Module for working with compressed files.
 *
 * Usage sample:
 *
 *      var compressors = require('UBCompressors');
 *      compressors.unBzipM2
 *
 * @module UBCompressors
 */
var binding = require('./UBCompressors.dll');
/**
 * Decompress files from Megapolis2(TM) bzip format(first 4 bytes are length of uncompressed files)
 * @param {ArrayBuffer} buffer
 * @return ArrayBuffer
 */
module.exports.unBzipM2 = binding.unBzipM2;

/**
 * Compress file using gzip algorithm
 * @param {String} fileNameFrom
 * @param {String} fileNameTo
 */
module.exports.gzipFile = binding.gzipFile;
/**
 * Decompress file using gzip algorithm
 * @param {String} fileNameFrom
 * @param {String} fileNameTo
 */
module.exports.gunzipFile = binding.gunzipFile;