Skip to content

Latest commit

 

History

History
65 lines (40 loc) · 1.72 KB

zipFromUrl.md

File metadata and controls

65 lines (40 loc) · 1.72 KB

happy-opfsDocs


happy-opfs / zipFromUrl

Function: zipFromUrl()

zipFromUrl(sourceUrl, zipFilePath, requestInit)

function zipFromUrl(
   sourceUrl, 
   zipFilePath, 
   requestInit?): AsyncVoidIOResult

Zip a remote file and write to a zip file.

Use fflate as the zip backend.

Parameters

Parameter Type Description
sourceUrl string The url to be zipped.
zipFilePath string The path to the zip file.
requestInit? FsRequestInit Optional request initialization parameters.

Returns

AsyncVoidIOResult

A promise that resolves to an AsyncIOResult indicating whether the source was successfully zipped.

Defined in

fs/opfs_zip.ts:114

zipFromUrl(sourceUrl, requestInit)

function zipFromUrl(sourceUrl, requestInit?): AsyncIOResult<Uint8Array>

Zip a remote file and return the zip file data.

Use fflate as the zip backend.

Parameters

Parameter Type Description
sourceUrl string The url to be zipped.
requestInit? FsRequestInit Optional request initialization parameters.

Returns

AsyncIOResult<Uint8Array>

A promise that resolves to an AsyncIOResult indicating whether the source was successfully zipped.

Defined in

fs/opfs_zip.ts:124