gzip 压缩工具(二期 V2 协议)
gzip 压缩工具(二期 V2 协议)
(async, inner) gzipBytes(uint8) → {Promise.<Uint8Array>}
将 Uint8Array 用 gzip 压缩,返回压缩后的 Uint8Array。
使用浏览器原生 CompressionStream(Chrome 80+、Firefox 113+、Safari 16.4+)。
参数说明:
| Name | Type | Description |
|---|---|---|
uint8 |
Uint8Array | 原始字节 |
Returns:
压缩后字节
- Type
- Promise.<Uint8Array>
module: gzip