docs.rs failed to build rong_compression-0.3.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
rong_compression
Compression utilities attached to the Rong namespace.
JS APIs
Rong.zstdCompress(data, options?)- asynchronously compress bytes with ZstandardRong.zstdCompressSync(data, options?)- synchronously compress bytes with ZstandardRong.zstdDecompress(data)- asynchronously decompress Zstandard bytesRong.zstdDecompressSync(data)- synchronously decompress Zstandard bytesRong.gzip(data, options?)- asynchronously compress bytes with gzipRong.gzipSync(data, options?)- synchronously compress bytes with gzipRong.gunzip(data)- asynchronously decompress gzip bytesRong.gunzipSync(data)- synchronously decompress gzip bytes
When To Use Sync vs Async
- Use
zstdCompress()/zstdDecompress()andgzip()/gunzip()when payloads may be large or when you are inside request handling, long-running services, workers, or other latency-sensitive code paths. - Use the synchronous variants for short scripts, startup-time preprocessing, tests, build steps, and small payloads where blocking the current thread is acceptable.
- Prefer
gzip()/gunzip()over the sync variants when gzip compatibility is required but the work sits on a hot runtime path.
Input
Uint8Array- any other
TypedArray ArrayBuffer
Options
level- compression level from1to22, default3
Gzip Options
level- compression level from-1to9, default-1