code
stringlengths
24
2.07M
docstring
stringlengths
25
85.3k
func_name
stringlengths
1
92
language
stringclasses
1 value
repo
stringlengths
5
64
path
stringlengths
4
172
url
stringlengths
44
218
license
stringclasses
7 values
function getMaximumCompressedSize(uncompressedSize) { return uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1)); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getMaximumCompressedSize
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
function setUint8(view, offset, value) { view.setUint8(offset, value); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
setUint8
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
function setUint16(view, offset, value) { view.setUint16(offset, value, true); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
setUint16
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
function setUint32(view, offset, value) { view.setUint32(offset, value, true); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
setUint32
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
function setBigUint64(view, offset, value) { view.setBigUint64(offset, value, true); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
setBigUint64
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
function arraySet(array, typedArray, offset) { array.set(typedArray, offset); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
arraySet
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
function getDataView(array) { return new DataView(array.buffer); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getDataView
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
function getLength(...arrayLikes) { let result = 0; arrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length)); return result; }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getLength
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
constructor(fs, name, params, parent) { const zipEntry = this; if (fs.root && parent && parent.getChildByName(name)) { throw new Error("Entry filename already exists"); } if (!params) { params = {}; } Object.assign(zipEntry, { fs, name, data: params.data, options: params.option...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
constructor
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
moveTo(target) { // deprecated const zipEntry = this; zipEntry.fs.move(zipEntry, target); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
moveTo
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
getFullname() { return this.getRelativeName(); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getFullname
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
getRelativeName(ancestor = this.fs.root) { const zipEntry = this; let relativeName = zipEntry.name; let entry = zipEntry.parent; while (entry && entry != ancestor) { relativeName = (entry.name ? entry.name + "/" : "") + relativeName; entry = entry.parent; } return relativeName; }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getRelativeName
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
isDescendantOf(ancestor) { let entry = this.parent; while (entry && entry.id != ancestor.id) { entry = entry.parent; } return Boolean(entry); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
isDescendantOf
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
rename(name) { const parent = this.parent; if (parent && parent.getChildByName(name)) { throw new Error("Entry filename already exists"); } else { this.name = name; } }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
rename
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
constructor(fs, name, params, parent) { super(fs, name, params, parent); const zipEntry = this; zipEntry.Reader = params.Reader; zipEntry.Writer = params.Writer; if (params.getData) { zipEntry.getData = params.getData; } }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
constructor
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
clone() { return new ZipFileEntry(this.fs, this.name, this); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
clone
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
async getData(writer, options = {}) { const zipEntry = this; if (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) { return zipEntry.data; } else { const reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options); const uncompressedSize = zipEntry.data ? zipEntry.data...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getData
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
isPasswordProtected() { return this.data.encrypted; }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
isPasswordProtected
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
async checkPassword(password, options = {}) { const zipEntry = this; if (zipEntry.isPasswordProtected()) { options.password = password; options.checkPasswordOnly = true; try { await zipEntry.data.getData(null, options); return true; } catch (error) { if (error.message == ERR_INVALID...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
checkPassword
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
getText(encoding, options) { return this.getData(new TextWriter(encoding), options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getText
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
getBlob(mimeType, options) { return this.getData(new BlobWriter(mimeType), options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getBlob
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
getData64URI(mimeType, options) { return this.getData(new Data64URIWriter(mimeType), options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getData64URI
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
getUint8Array(options) { return this.getData(new Uint8ArrayWriter(), options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getUint8Array
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
getWritable(writable = new WritableStream(), options) { return this.getData({ writable }, options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getWritable
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
replaceBlob(blob) { Object.assign(this, { data: blob, Reader: BlobReader, Writer: BlobWriter, reader: null }); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
replaceBlob
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
replaceText(text) { Object.assign(this, { data: text, Reader: TextReader, Writer: TextWriter, reader: null }); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
replaceText
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
replaceData64URI(dataURI) { Object.assign(this, { data: dataURI, Reader: Data64URIReader, Writer: Data64URIWriter, reader: null }); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
replaceData64URI
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
replaceUint8Array(array) { Object.assign(this, { data: array, Reader: Uint8ArrayReader, Writer: Uint8ArrayWriter, reader: null }); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
replaceUint8Array
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
replaceReadable(readable) { Object.assign(this, { data: null, Reader: function () { return { readable }; }, Writer: null, reader: null }); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
replaceReadable
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
constructor(fs, name, params, parent) { super(fs, name, params, parent); this.directory = true; }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
constructor
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
clone(deepClone) { const zipEntry = this; const clonedEntry = new ZipDirectoryEntry(zipEntry.fs, zipEntry.name); if (deepClone) { clonedEntry.children = zipEntry.children.map(child => { const childClone = child.clone(deepClone); childClone.parent = clonedEntry; return childClone; }); ...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
clone
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
addDirectory(name, options) { return addChild(this, name, { options }, true); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addDirectory
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
addText(name, text, options = {}) { return addChild(this, name, { data: text, Reader: TextReader, Writer: TextWriter, options, uncompressedSize: text.length }); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addText
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
addBlob(name, blob, options = {}) { return addChild(this, name, { data: blob, Reader: BlobReader, Writer: BlobWriter, options, uncompressedSize: blob.size }); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addBlob
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
addData64URI(name, dataURI, options = {}) { let dataEnd = dataURI.length; while (dataURI.charAt(dataEnd - 1) == "=") { dataEnd--; } const dataStart = dataURI.indexOf(",") + 1; return addChild(this, name, { data: dataURI, Reader: Data64URIReader, Writer: Data64URIWriter, options, u...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addData64URI
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
addUint8Array(name, array, options = {}) { return addChild(this, name, { data: array, Reader: Uint8ArrayReader, Writer: Uint8ArrayWriter, options, uncompressedSize: array.length }); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addUint8Array
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
addHttpContent(name, url, options = {}) { return addChild(this, name, { data: url, Reader: class extends HttpReader { constructor(url) { super(url, options); } }, options }); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addHttpContent
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
constructor(url) { super(url, options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
constructor
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
addReadable(name, readable, options = {}) { return addChild(this, name, { Reader: function () { return { readable }; }, options }); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addReadable
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
addFileSystemEntry(fileSystemEntry, options = {}) { return addFileSystemHandle(this, fileSystemEntry, options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addFileSystemEntry
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
addFileSystemHandle(handle, options = {}) { return addFileSystemHandle(this, handle, options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addFileSystemHandle
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
addFile(file, options = {}) { if (!options.lastModDate) { options.lastModDate = new Date(file.lastModified); } return addChild(this, file.name, { data: file, Reader: function () { const readable = file.stream(); const size = file.size; return { readable, size }; }, options, ...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addFile
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
addData(name, params) { return addChild(this, name, params); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addData
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
importBlob(blob, options) { return this.importZip(new BlobReader(blob), options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
importBlob
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
importData64URI(dataURI, options) { return this.importZip(new Data64URIReader(dataURI), options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
importData64URI
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
importUint8Array(array, options) { return this.importZip(new Uint8ArrayReader(array), options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
importUint8Array
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
importHttpContent(url, options) { return this.importZip(new HttpReader(url, options), options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
importHttpContent
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
importReadable(readable, options) { return this.importZip({ readable }, options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
importReadable
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
exportBlob(options = {}) { return this.exportZip(new BlobWriter(options.mimeType || "application/zip"), options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
exportBlob
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
exportData64URI(options = {}) { return this.exportZip(new Data64URIWriter(options.mimeType || "application/zip"), options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
exportData64URI
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
exportUint8Array(options = {}) { return this.exportZip(new Uint8ArrayWriter(), options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
exportUint8Array
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
async exportWritable(writable = new WritableStream(), options = {}) { await this.exportZip({ writable }, options); return writable; }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
exportWritable
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
async importZip(reader, options = {}) { await initStream(reader); const zipReader = new ZipReader(reader, options); const importedEntries = []; const entries = await zipReader.getEntries(); for (const entry of entries) { let parent = this; try { const path = entry.filename.split("/"); c...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
importZip
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
async exportZip(writer, options) { const zipEntry = this; if (options.bufferedWrite === UNDEFINED_VALUE) { options.bufferedWrite = true; } await Promise.all([initReaders(zipEntry, options.readerOptions), initStream(writer)]); const zipWriter = new ZipWriter(writer, options); await exportZip(zipWri...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
exportZip
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
getChildByName(name) { const children = this.children; for (let childIndex = 0; childIndex < children.length; childIndex++) { const child = children[childIndex]; if (child.name == name) { return child; } } }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getChildByName
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
isPasswordProtected() { const children = this.children; for (let childIndex = 0; childIndex < children.length; childIndex++) { const child = children[childIndex]; if (child.isPasswordProtected()) { return true; } } return false; }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
isPasswordProtected
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
async checkPassword(password, options = {}) { const children = this.children; const result = await Promise.all(children.map(child => child.checkPassword(password, options))); return !result.includes(false); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
checkPassword
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
get children() { return this.root.children; }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
children
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
remove(entry) { detach(entry); this.entries[entry.id] = null; }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
remove
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
move(entry, destination) { if (entry == this.root) { throw new Error("Root directory cannot be moved"); } else { if (destination.directory) { if (!destination.isDescendantOf(entry)) { if (entry != destination) { if (destination.getChildByName(entry.name)) { throw new Error("Entry...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
move
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
find(fullname) { const path = fullname.split("/"); let node = this.root; for (let index = 0; node && index < path.length; index++) { node = node.getChildByName(path[index]); } return node; }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
find
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
getById(id) { return this.entries[id]; }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getById
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
getChildByName(name) { return this.root.getChildByName(name); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getChildByName
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
addDirectory(name, options) { return this.root.addDirectory(name, options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addDirectory
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
addText(name, text, options) { return this.root.addText(name, text, options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addText
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
addBlob(name, blob, options) { return this.root.addBlob(name, blob, options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addBlob
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
addData64URI(name, dataURI, options) { return this.root.addData64URI(name, dataURI, options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addData64URI
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
addUint8Array(name, array, options) { return this.root.addUint8Array(name, array, options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addUint8Array
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
addHttpContent(name, url, options) { return this.root.addHttpContent(name, url, options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addHttpContent
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
addReadable(name, readable, options) { return this.root.addReadable(name, readable, options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addReadable
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
addFileSystemEntry(fileSystemEntry, options) { return this.root.addFileSystemEntry(fileSystemEntry, options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addFileSystemEntry
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
addFileSystemHandle(handle, options) { return this.root.addFileSystemHandle(handle, options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addFileSystemHandle
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
addFile(file, options) { return this.root.addFile(file, options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addFile
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
addData(name, params) { return this.root.addData(name, params); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addData
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
importBlob(blob, options) { resetFS(this); return this.root.importBlob(blob, options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
importBlob
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
importData64URI(dataURI, options) { resetFS(this); return this.root.importData64URI(dataURI, options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
importData64URI
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
importUint8Array(array, options) { resetFS(this); return this.root.importUint8Array(array, options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
importUint8Array
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
importHttpContent(url, options) { resetFS(this); return this.root.importHttpContent(url, options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
importHttpContent
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
importReadable(readable, options) { resetFS(this); return this.root.importReadable(readable, options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
importReadable
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
importZip(reader, options) { return this.root.importZip(reader, options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
importZip
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
exportBlob(options) { return this.root.exportBlob(options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
exportBlob
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
exportData64URI(options) { return this.root.exportData64URI(options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
exportData64URI
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
exportUint8Array(options) { return this.root.exportUint8Array(options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
exportUint8Array
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
exportWritable(writable, options) { return this.root.exportWritable(writable, options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
exportWritable
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
isPasswordProtected() { return this.root.isPasswordProtected(); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
isPasswordProtected
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
checkPassword(password, options) { return this.root.checkPassword(password, options); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
checkPassword
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
function getTotalSize(entries, propertyName) { let size = 0; entries.forEach(process); return size; function process(entry) { size += entry[propertyName]; if (entry.children) { entry.children.forEach(process); } } }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getTotalSize
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
function process(entry) { size += entry[propertyName]; if (entry.children) { entry.children.forEach(process); } }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
process
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
function getZipBlobReader(options) { return class extends Reader { constructor(entry, options = {}) { super(); this.entry = entry; this.options = options; } async init() { const zipBlobReader = this; zipBlobReader.size = zipBlobReader.entry.uncompressedSize; const data = await zipBl...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getZipBlobReader
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
constructor(entry, options = {}) { super(); this.entry = entry; this.options = options; }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
constructor
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
async init() { const zipBlobReader = this; zipBlobReader.size = zipBlobReader.entry.uncompressedSize; const data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options)); zipBlobReader.data = data; zipBlobReader.blobReader = new BlobReader(data); s...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
init
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
readUint8Array(index, length) { return this.blobReader.readUint8Array(index, length); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
readUint8Array
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
async function initReaders(entry, options) { if (entry.children.length) { await Promise.all(entry.children.map(async child => { if (child.directory) { await initReaders(child, options); } else { const reader = child.reader = new child.Reader(child.data, options); try { await initStream...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
initReaders
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
function detach(entry) { if (entry.parent) { const children = entry.parent.children; children.forEach((child, index) => { if (child.id == entry.id) { children.splice(index, 1); } }); } }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
detach
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
async function exportZip(zipWriter, entry, totalSize, options) { const selectedEntry = entry; const entryOffsets = new Map(); await process(zipWriter, entry); async function process(zipWriter, entry) { await exportChild(); async function exportChild() { if (options.bufferedWrite) { await Promis...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
exportZip
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
async function process(zipWriter, entry) { await exportChild(); async function exportChild() { if (options.bufferedWrite) { await Promise.allSettled(entry.children.map(processChild)); } else { for (const child of entry.children) { await processChild(child); } } } async fun...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
process
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
async function exportChild() { if (options.bufferedWrite) { await Promise.allSettled(entry.children.map(processChild)); } else { for (const child of entry.children) { await processChild(child); } } }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
exportChild
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
async function processChild(child) { const name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname(); const childOptions = child.options || {}; let zipEntryOptions = {}; if (child.data instanceof Entry) { const { externalFileAttributes, versionMadeBy, ...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
processChild
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
function addFileSystemHandle(zipEntry, handle, options) { return addFile(zipEntry, handle, []); async function addFile(parentEntry, handle, addedEntries) { if (handle) { try { if (handle.isFile || handle.isDirectory) { handle = await transformToFileSystemhandle(handle); } if (handle.kin...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addFileSystemHandle
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause
async function addFile(parentEntry, handle, addedEntries) { if (handle) { try { if (handle.isFile || handle.isDirectory) { handle = await transformToFileSystemhandle(handle); } if (handle.kind == "file") { const file = await handle.getFile(); addedEntries.push( parentEntry...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
addFile
javascript
gildas-lormeau/zip.js
dist/zip-fs-full.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs-full.js
BSD-3-Clause