@cloudpss/compress 0.6.15 → 0.6.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +9 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -4,6 +4,15 @@ A set of compression algorithms used by CloudPSS.
4
4
  Auto detect algorithm by magic number.
5
5
  Be carful when handling binary files since their data might be confusing with magic numbers of compressed data.
6
6
 
7
+ ## Example
8
+
9
+ ```ts
10
+ import { compress, decompress } from '@cloudpss/compress';
11
+
12
+ const compressed = await compress(new Uint8Array([1, 2, 3]), 'zstd');
13
+ const original = await decompress(compressed);
14
+ ```
15
+
7
16
  ## Algorithms
8
17
 
9
18
  | Algorithm | Magic number | Filename extension | Mime type |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudpss/compress",
3
- "version": "0.6.15",
3
+ "version": "0.6.16",
4
4
  "author": "CloudPSS",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "devDependencies": {
25
25
  "@bokuweb/zstd-wasm": "0.0.27",
26
- "@types/node": "^25.0.9",
26
+ "@types/node": "^25.0.10",
27
27
  "@types/pako": "^2.0.4",
28
28
  "@xingrz/cppzst": "2.1.0-alpha.8",
29
29
  "brotli-wasm": "^3.0.1",