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 watchClosedStream(writableSource) { let resolveStreamClosed; const closed = new Promise(resolve => resolveStreamClosed = resolve); const writable = new WritableStream({ async write(chunk) { const writer = writableSource.getWriter(); await writer.ready; await writer.write(chunk); writer...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
watchClosedStream
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async write(chunk) { const writer = writableSource.getWriter(); await writer.ready; await writer.write(chunk); writer.releaseLock(); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
write
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
abort(reason) { const writer = writableSource.getWriter(); return writer.abort(reason); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
abort
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function getWebWorker(url, baseURL, workerData) { const workerOptions = { type: "module" }; let scriptUrl, worker; if (typeof url == FUNCTION_TYPE) { url = url(); } try { scriptUrl = new URL(url, baseURL); // eslint-disable-next-line no-unused-vars } catch (_) { scriptUrl = url; } if (classi...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getWebWorker
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) { try { const { value, readable, writable } = message; const transferables = []; if (value) { if (value.byteLength < value.buffer.byteLength) { message.value = value.buffer.slice(0, value.byteLength); } else {...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
sendMessage
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async function onMessage({ data }, workerData) { const { type, value, messageId, result, error } = data; const { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData; try { if (error) { const { message, stack, code, name } = error; const responseError = new Error(message); Obj...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
onMessage
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function close(error, result) { if (error) { rejectResult(error); } else { resolveResult(result); } if (writer) { writer.releaseLock(); } onTaskFinished(); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
close
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async function runWorker(stream, workerOptions) { const { options, config } = workerOptions; const { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options; const { workerScripts, maxWorkers } = config; workerOptions.transferStreams = transferStreams || transf...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
runWorker
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async function getWorker() { const workerData = pool.find(workerData => !workerData.busy); if (workerData) { clearTerminateTimeout(workerData); return new CodecWorker(workerData, stream, workerOptions, onTaskFinished); } else if (pool.length < maxWorkers) { const workerData = { indexWorker }; i...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getWorker
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function onTaskFinished(workerData) { if (pendingRequests.length) { const [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1); resolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished)); } else if (workerData.worker) { clearTerminateTimeout(workerData); terminateWo...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
onTaskFinished
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function terminateWorker(workerData, workerOptions) { const { config } = workerOptions; const { terminateWorkerTimeout } = config; if (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) { if (workerData.terminated) { workerData.terminated = false; } else { workerData.terminateTi...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
terminateWorker
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function clearTerminateTimeout(workerData) { const { terminateTimeout } = workerData; if (terminateTimeout) { clearTimeout(terminateTimeout); workerData.terminateTimeout = 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.
clearTerminateTimeout
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async function terminateWorkers() { await Promise.allSettled(pool.map(workerData => { clearTerminateTimeout(workerData); return workerData.terminate(); })); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
terminateWorkers
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
constructor() { this.size = 0; }
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
init() { this.initialized = 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.
init
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
get readable() { const reader = this; const { chunkSize = DEFAULT_CHUNK_SIZE } = reader; const readable = new ReadableStream({ start() { this.chunkOffset = 0; }, async pull(controller) { const { offset = 0, size, diskNumberStart } = readable; const { chunkOffset } = this; const ...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
readable
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
start() { this.chunkOffset = 0; }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
start
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async pull(controller) { const { offset = 0, size, diskNumberStart } = readable; const { chunkOffset } = this; const dataSize = size === UNDEFINED_VALUE ? chunkSize : Math.min(chunkSize, size - chunkOffset); const data = await readUint8Array(reader, offset + chunkOffset, dataSize, diskNumberStart); ...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
pull
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
constructor() { super(); const writer = this; const writable = new WritableStream({ write(chunk) { if (!writer.initialized) { throw new Error(ERR_WRITER_NOT_INITIALIZED); } return writer.writeUint8Array(chunk); } }); Object.defineProperty(writer, PROPERTY_NAME_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.
constructor
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
write(chunk) { if (!writer.initialized) { throw new Error(ERR_WRITER_NOT_INITIALIZED); } return writer.writeUint8Array(chunk); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
write
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
get() { 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.
get
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
writeUint8Array() { // abstract }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
writeUint8Array
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
constructor(dataURI) { super(); let dataEnd = dataURI.length; while (dataURI.charAt(dataEnd - 1) == "=") { dataEnd--; } const dataStart = dataURI.indexOf(",") + 1; Object.assign(this, { dataURI, dataStart, size: Math.floor((dataEnd - dataStart) * 0.75) }); }
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
readUint8Array(offset, length) { const { dataStart, dataURI } = this; const dataArray = new Uint8Array(length); const start = Math.floor(offset / 3) * 4; const bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart)); const delta = offset - Math.floo...
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
constructor(contentType) { super(); Object.assign(this, { data: "data:" + (contentType || "") + ";base64,", pending: [] }); }
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
writeUint8Array(array) { const writer = this; let indexArray = 0; let dataString = writer.pending; const delta = writer.pending.length; writer.pending = ""; for (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) { dataString += String.fromCharCode(arr...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
writeUint8Array
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
getData() { return this.data + btoa(this.pending); }
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
constructor(blob) { super(); Object.assign(this, { blob, size: 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.
constructor
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async readUint8Array(offset, length) { const reader = this; const offsetEnd = offset + length; const blob = offset || offsetEnd < reader.size ? reader.blob.slice(offset, offsetEnd) : reader.blob; let arrayBuffer = await blob.arrayBuffer(); if (arrayBuffer.byteLength > length) { arrayBuffer = arrayBuf...
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
constructor(contentType) { super(); const writer = this; const transformStream = new TransformStream(); const headers = []; if (contentType) { headers.push([HTTP_HEADER_CONTENT_TYPE, contentType]); } Object.defineProperty(writer, PROPERTY_NAME_WRITABLE, { get() { return transformStream...
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
get() { return transformStream.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.
get
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
getData() { return this.blob; }
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
constructor(text) { super(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN })); }
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
constructor(encoding) { super(encoding); Object.assign(this, { encoding, utf8: !encoding || encoding.toLowerCase() == "utf-8" }); }
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async getData() { const { encoding, utf8 } = this; const blob = await super.getData(); if (blob.text && utf8) { return blob.text(); } else { const reader = new FileReader(); return new Promise((resolve, reject) => { Object.assign(reader, { onload: ({ target }) => resolve(ta...
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
constructor(url, options) { super(); createHttpReader(this, 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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async init() { await initHttpReader(this, sendFetchRequest, getFetchRequestData); super.init(); }
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
readUint8Array(index, length) { return readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData); }
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
constructor(url, options) { super(); createHttpReader(this, 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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async init() { await initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData); super.init(); }
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
readUint8Array(index, length) { return readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData); }
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function createHttpReader(httpReader, url, options) { const { preventHeadRequest, useRangeHeader, forceRangeRequests, combineSizeEocd } = options; options = Object.assign({}, options); delete options.preventHeadRequest; delete options.useRangeHeader; delete options.forceRangeRequests; delete o...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
createHttpReader
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async function initHttpReader(httpReader, sendRequest, getRequestData) { const { url, preventHeadRequest, useRangeHeader, forceRangeRequests, combineSizeEocd } = httpReader; if (isHttpFamily(url) && (useRangeHeader || forceRangeRequests) && (typeof preventHeadRequest == "undefined" || preventHeadRe...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
initHttpReader
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) { const { useRangeHeader, forceRangeRequests, eocdCache, size, options } = httpReader; if (useRangeHeader || forceRangeRequests) { if (eocdCache && index == size - END_OF_CENTRAL_DIR_LENGTH && 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.
readUint8ArrayHttpReader
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function getRangeHeaders(httpReader, index = 0, length = 1) { return Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + "=" + (index < 0 ? index : index + "-" + (index + length - 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.
getRangeHeaders
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function getHeaders({ options }) { const { headers } = options; if (headers) { if (Symbol.iterator in headers) { return Object.fromEntries(headers); } else { return headers; } } }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getHeaders
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async function getFetchRequestData(httpReader) { await getRequestData(httpReader, sendFetchRequest); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getFetchRequestData
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async function getXMLHttpRequestData(httpReader) { await getRequestData(httpReader, sendXMLHttpRequest); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getXMLHttpRequestData
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async function getRequestData(httpReader, sendRequest) { const response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader)); httpReader.data = new Uint8Array(await response.arrayBuffer()); if (!httpReader.size) { httpReader.size = httpReader.data.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.
getRequestData
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async function getContentLength(httpReader, sendRequest, getRequestData) { if (httpReader.preventHeadRequest) { await getRequestData(httpReader, httpReader.options); } else { const response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader)); const contentLength = response.headers.get...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getContentLength
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async function sendFetchRequest(method, { options, url }, headers) { const response = await fetch(url, Object.assign({}, options, { method, headers })); if (response.status < 400) { return response; } else { throw response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.sta...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
sendFetchRequest
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function sendXMLHttpRequest(method, { url }, headers) { return new Promise((resolve, reject) => { const request = new XMLHttpRequest(); request.addEventListener("load", () => { if (request.status < 400) { const headers = []; request.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(header =>...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
sendXMLHttpRequest
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
constructor(url, options = {}) { super(); Object.assign(this, { url, reader: options.useXHR ? new XHRReader(url, options) : new FetchReader(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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
set size(value) { // ignored }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
size
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
get size() { return this.reader.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.
size
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async init() { await this.reader.init(); super.init(); }
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
readUint8Array(index, length) { return this.reader.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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
constructor(url, options = {}) { options.useRangeHeader = true; 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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
constructor(array) { super(); Object.assign(this, { array, size: 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.
constructor
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
readUint8Array(index, length) { return this.array.slice(index, 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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
init(initSize = 0) { Object.assign(this, { offset: 0, array: new Uint8Array(initSize) }); super.init(); }
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
writeUint8Array(array) { const writer = this; if (writer.offset + array.length > writer.array.length) { const previousArray = writer.array; writer.array = new Uint8Array(previousArray.length + array.length); writer.array.set(previousArray); } writer.array.set(array, writer.offset); writer.off...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
writeUint8Array
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
getData() { return this.array; }
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
constructor(readers) { super(); this.readers = readers; }
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async init() { const reader = this; const { readers } = reader; reader.lastDiskNumber = 0; reader.lastDiskOffset = 0; await Promise.all(readers.map(async (diskReader, indexDiskReader) => { await diskReader.init(); if (indexDiskReader != readers.length - 1) { reader.lastDiskOffset += diskRead...
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async readUint8Array(offset, length, diskNumber = 0) { const reader = this; const { readers } = this; let result; let currentDiskNumber = diskNumber; if (currentDiskNumber == -1) { currentDiskNumber = readers.length - 1; } let currentReaderOffset = offset; while (currentReaderOffset >= reade...
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
constructor(writerGenerator, maxSize = 4294967295) { super(); const writer = this; Object.assign(writer, { diskNumber: 0, diskOffset: 0, size: 0, maxSize, availableSize: maxSize }); let diskSourceWriter, diskWritable, diskWriter; const writable = new WritableStream({ async writ...
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async write(chunk) { const { availableSize } = writer; if (!diskWriter) { const { value, done } = await writerGenerator.next(); if (done && !value) { throw new Error(ERR_ITERATOR_COMPLETED_TOO_SOON); } else { diskSourceWriter = value; diskSourceWriter.size = 0; if...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
write
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async close() { await diskWriter.ready; await closeDisk(); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
close
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
get() { 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.
get
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async function writeChunk(chunk) { const chunkLength = chunk.length; if (chunkLength) { await diskWriter.ready; await diskWriter.write(chunk); diskSourceWriter.size += chunkLength; writer.size += chunkLength; writer.availableSize -= chunkLength; } }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
writeChunk
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async function closeDisk() { diskWritable.size = diskSourceWriter.size; await diskWriter.close(); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
closeDisk
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function isHttpFamily(url) { const { baseURL } = getConfiguration(); const { protocol } = new URL(url, baseURL); return protocol == "http:" || protocol == "https:"; }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
isHttpFamily
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async function initStream(stream, initSize) { if (stream.init && !stream.initialized) { await stream.init(initSize); } else { return Promise.resolve(); } }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
initStream
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function initReader(reader) { if (Array.isArray(reader)) { reader = new SplitDataReader(reader); } if (reader instanceof ReadableStream) { reader = { readable: reader }; } return reader; }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
initReader
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function initWriter(writer) { if (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) { writer = new SplitDataWriter(writer); } if (writer instanceof WritableStream) { writer = { writable: writer }; } const { writable } = writer; if (writable.size === UNDEFINED_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.
initWriter
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function readUint8Array(reader, offset, size, diskNumber) { return reader.readUint8Array(offset, size, diskNumber); }
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function decodeCP437(stringValue) { if (VALID_CP437) { let result = ""; for (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) { result += CP437[stringValue[indexCharacter]]; } return result; } else { return new TextDecoder().decode(stringValue); } }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
decodeCP437
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function decodeText(value, encoding) { if (encoding && encoding.trim().toLowerCase() == "cp437") { return decodeCP437(value); } else { return new TextDecoder(encoding).decode(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.
decodeText
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
constructor(data) { PROPERTY_NAMES.forEach(name => this[name] = data[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.
constructor
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
constructor(reader, options = {}) { Object.assign(this, { reader: initReader(reader), options, config: getConfiguration() }); }
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async* getEntriesGenerator(options = {}) { const zipReader = this; let { reader } = zipReader; const { config } = zipReader; await initStream(reader); if (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) { reader = new BlobReader(await new Response(reader.readable).blob()); await initSt...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getEntriesGenerator
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async getEntries(options = {}) { const entries = []; for await (const entry of this.getEntriesGenerator(options)) { entries.push(entry); } return entries; }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getEntries
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
constructor(options = {}) { const { readable, writable } = new TransformStream(); const gen = new ZipReader(readable, options).getEntriesGenerator(); this.readable = new ReadableStream({ async pull(controller) { const { done, value } = await gen.next(); if (done) return controller.close(); ...
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async pull(controller) { const { done, value } = await gen.next(); if (done) return controller.close(); const chunk = { ...value, readable: (function () { const { readable, writable } = new TransformStream(); if (value.getData) { value.getData(writable); re...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
pull
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
constructor(reader, config, options) { Object.assign(this, { reader, config, 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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async getData(writer, fileEntry, options = {}) { const zipEntry = this; const { reader, offset, diskNumberStart, extraFieldAES, compressionMethod, config, bitFlag, signature, rawLastModDate, uncompressedSize, compressedSize } = zipEntry; const localDirectory = fil...
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.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function readCommonHeader(directory, dataView, offset) { const rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2); const encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED; const rawLastModDate = getUint32(dataView, offset + 6); Object.assign(directory, { encrypted, version...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
readCommonHeader
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function readCommonFooter(fileEntry, directory, dataView, offset, localDirectory) { const { rawExtraField } = directory; const extraField = directory.extraField = new Map(); const rawExtraFieldView = getDataView$1(new Uint8Array(rawExtraField)); let offsetExtraField = 0; try { while (offsetExtraField < raw...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
readCommonFooter
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function readExtraFieldZip64(extraFieldZip64, directory) { directory.zip64 = true; const extraFieldView = getDataView$1(extraFieldZip64.data); const missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max); for (let indexMissingProperty = 0, offset = 0; indexMissingPr...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
readExtraFieldZip64
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) { const extraFieldView = getDataView$1(extraFieldUnicode.data); const crc32 = new Crc32(); crc32.append(fileEntry[rawPropertyName]); const dataViewSignature = getDataView$1(new Uint8Array(4)); dataViewSignat...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
readExtraFieldUnicode
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function readExtraFieldAES(extraFieldAES, directory, compressionMethod) { const extraFieldView = getDataView$1(extraFieldAES.data); const strength = getUint8(extraFieldView, 4); Object.assign(extraFieldAES, { vendorVersion: getUint8(extraFieldView, 0), vendorId: getUint8(extraFieldView, 2), strength, ...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
readExtraFieldAES
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function readExtraFieldNTFS(extraFieldNTFS, directory) { const extraFieldView = getDataView$1(extraFieldNTFS.data); let offsetExtraField = 4; let tag1Data; try { while (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) { const tagValue = getUint16(extraFieldView, offsetExtraField); const at...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
readExtraFieldNTFS
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory, localDirectory) { const extraFieldView = getDataView$1(extraFieldExtendedTimestamp.data); const flags = getUint8(extraFieldView, 0); const timeProperties = []; const timeRawProperties = []; if (localDirectory) { if ((flags & 0...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
readExtraFieldExtendedTimestamp
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) { const signatureArray = new Uint8Array(4); const signatureView = getDataView$1(signatureArray); setUint32$1(signatureView, 0, signature); const maximumBytes = minimumBytes + maximumLength; return (await seek(minimumByte...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
seekSignature
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
async function seek(length) { const offset = startOffset - length; const bytes = await readUint8Array(reader, offset, length); for (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) { if (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] && byte...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
seek
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function getOptionValue$1(zipReader, options, name) { return options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[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.
getOptionValue$1
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function getDate(timeRaw) { const date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff; try { return new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0); // eslint-disable-next-line no-unused-vars ...
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getDate
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function getDateNTFS(timeRaw) { return new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000)))); }
HMAC with the specified hash function. @constructor @param {bitArray} key the key for HMAC. @param {Object} [Hash=hash.sha1] The hash function to use.
getDateNTFS
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause
function getUint8(view, offset) { return view.getUint8(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.
getUint8
javascript
gildas-lormeau/zip.js
dist/zip-fs.js
https://github.com/gildas-lormeau/zip.js/blob/master/dist/zip-fs.js
BSD-3-Clause