compress-json-jz64
ai-research-agent / datasets/compress-json-jz64
Functions
compressBase64ZipText()
function compressBase64ZipText(dataOrZip, options?): Promise<string>
Compress/decompress any data (such as JSON or text) with JSZip then convert zip binary to a Base64Zip text string which is easier to store in db or files.
Parameters
Parameter | Type | Description |
---|---|---|
|
| data to compress, or Base64Zip to decompress |
| { | |
|
| default=9 0-9, 9 has smallest size at ~40% but takes longer |
|
| default=false false to compress, true to decompress |
Returns
Promise
<string
>
base64-encoded string of the zipped data