Example #1
0
  // Load pack given binary data + optional informative name
  constructor(packData) {
    this.name = name;
    if (packData instanceof ArrayBuffer) {
      // zip with bops uses Uint8Array data view
      packData = new Uint8Array(packData);
    }
    this.zip = new ZIP.Reader(packData);

    this.zipEntries = {};
    this.zip.forEach((entry) => {
      this.zipEntries[entry.getName()] = entry;
    });

    this.namespaces = this.scanNamespaces();
  }
Example #2
0
var Fs = exports.Fs = function (data) {
    var reader = new ZIP.Reader(data);
    return MOCK.Fs(reader.toObject());
};