Provides methods for compressing and decompressing data using zip.js and lz-string.
Methods
Compresses a string using zip.js and encodes it as base64.
Name | Type | Description |
---|---|---|
input |
string | The input string to compress. |
Returns:
- The compressed base64 string.
Compresses a string using zip.js and returns a Blob.
Name | Type | Description |
---|---|---|
filename |
string | The name of the file inside the zip. |
data |
string | The string data to compress. |
Returns:
- The compressed Blob.
Decodes a base64-encoded zip.js compressed JSON array.
Name | Type | Description |
---|---|---|
base64String |
string | The base64 encoded compressed JSON array. |
Returns:
- The decoded JSON object containing code, HTML, and baseHref.
Decompresses a base64-encoded zip.js compressed string.
Name | Type | Description |
---|---|---|
base64String |
string | The base64 encoded compressed data. |
Returns:
- The decompressed string.
Decompresses a zip Blob using zip.js.
Name | Type | Description |
---|---|---|
zipBlob |
Blob | The zip Blob. |
Returns:
- A mapping of filenames to their decompressed contents.