happy-opfs • Docs
happy-opfs / zipFromUrl
function zipFromUrl(
sourceUrl,
zipFilePath,
requestInit?): AsyncVoidIOResult
Zip a remote file and write to a zip file.
Use fflate as the zip backend.
Parameter | Type | Description |
---|---|---|
sourceUrl |
string |
The url to be zipped. |
zipFilePath |
string |
The path to the zip file. |
requestInit ? |
FsRequestInit |
Optional request initialization parameters. |
AsyncVoidIOResult
A promise that resolves to an AsyncIOResult
indicating whether the source was successfully zipped.
function zipFromUrl(sourceUrl, requestInit?): AsyncIOResult<Uint8Array>
Zip a remote file and return the zip file data.
Use fflate as the zip backend.
Parameter | Type | Description |
---|---|---|
sourceUrl |
string |
The url to be zipped. |
requestInit ? |
FsRequestInit |
Optional request initialization parameters. |
AsyncIOResult
<Uint8Array
>
A promise that resolves to an AsyncIOResult
indicating whether the source was successfully zipped.