How to use zip-stream - 7 common examples

To help you get started, we’ve selected a few zip-stream examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github artem-karpenko / archiver-zip-encrypted / lib / aes / zip-aes-stream.js View on Github external
ZipAesStream.prototype._writeLocalFileHeader = function (ae) {
    let gpb = ae.getGeneralPurposeBit();

    // set AES-specific fields
    gpb.useEncryption(true);
    ae.setExtra(_buildAesExtraField(ae));
    ae.setMethod(ZIP_AES_METHOD);
    ae.setVersionNeededToExtract(51);

    ZipStream.prototype._writeLocalFileHeader.call(this, ae);
};
github artem-karpenko / archiver-zip-encrypted / lib / zip20 / zip-crypto-stream.js View on Github external
ZipCryptoStream.prototype._writeLocalFileHeader = function (ae) {
    // set encryption
    ae.getGeneralPurposeBit().useEncryption(true);
    ZipStream.prototype._writeLocalFileHeader.call(this, ae);
};
github ksoichiro / node-archiver-zip-encryptable / lib / zip-crypto-stream.js View on Github external
ZipCryptoStream.prototype.entry = function(source, data, callback) {
  return ZipStream.prototype.entry.call(this, source, data, callback);
};
github ksoichiro / node-archiver-zip-encryptable / lib / zip-crypto-stream.js View on Github external
ZipCryptoStream.prototype._appendStream = function(ae, source, callback) {
  ae.gpb.useEncryption(true);
  ZipStream.prototype._appendStream.call(this, ae, source, callback);
};
github ksoichiro / node-archiver-zip-encryptable / lib / zip-crypto-stream.js View on Github external
ZipCryptoStream.prototype._normalizeFileData = function(data) {
  return ZipStream.prototype._normalizeFileData.call(this, data);
};
github artem-karpenko / archiver-zip-encrypted / lib / zip20 / zip-crypto-stream.js View on Github external
const ZipCryptoStream = function (options = {zlib: {}}) {
    if (!(this instanceof ZipCryptoStream)) {
        return new ZipCryptoStream(options);
    }

    this.key = options.password;
    if (!Buffer.isBuffer(this.key)) {
        this.key = Buffer.from(options.password);
    }

    ZipStream.call(this, options);
};
inherits(ZipCryptoStream, ZipStream);
github artem-karpenko / archiver-zip-encrypted / lib / aes / zip-aes-stream.js View on Github external
const ZipAesStream = function (options = {zlib: {}}) {
    if (!(this instanceof ZipAesStream)) {
        return new ZipAesStream(options);
    }

    this.key = options.password;
    if (!Buffer.isBuffer(this.key)) {
        this.key = Buffer.from(this.key);
    }

    ZipStream.call(this, options);
};
inherits(ZipAesStream, ZipStream);

zip-stream

a streaming zip archive generator.

MIT
Latest version published 18 days ago

Package Health Score

85 / 100
Full package analysis

Popular zip-stream functions