@crossbind/port-zstd 2.0.0-beta.62 → 2.0.0-beta.63
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.
- package/README.md +9 -7
- package/mergeConfig.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
**Precompiled Zstandard (zstd) library built with crossbind for seamless integration in JavaScript, WebAssembly and React Native projects.**
|
|
3
3
|
|
|
4
4
|
<a href="https://www.npmjs.com/package/@crossbind/port-zstd">
|
|
5
|
-
<img alt="NPM version" src="https://img.shields.io/npm/v/@crossbind/port-zstd?style=for-the-badge" />
|
|
5
|
+
<img alt="NPM version" src="https://img.shields.io/npm/v/@crossbind/port-zstd/beta?style=for-the-badge" />
|
|
6
6
|
</a>
|
|
7
7
|
<a href="https://github.com/facebook/zstd">
|
|
8
|
-
<img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%
|
|
8
|
+
<img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fregistry.npmjs.org%2F%40crossbind%2Fport-zstd%2Fbeta&query=%24.nativeVersion&style=for-the-badge&label=ZSTD" />
|
|
9
9
|
</a>
|
|
10
10
|
<a href="https://github.com/facebook/zstd/blob/dev/LICENSE">
|
|
11
|
-
<img alt="License" src="https://img.shields.io/
|
|
11
|
+
<img alt="License" src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fregistry.npmjs.org%2F%40crossbind%2Fport-zstd%2Fbeta&query=%24.license&style=for-the-badge&label=license" />
|
|
12
12
|
</a>
|
|
13
13
|
|
|
14
14
|
> Use it together with **[crossbind](https://crossbind.dev)** — the toolchain for using C++ libraries from JavaScript, TypeScript, WebAssembly, Node.js and React Native. Learn more at **[crossbind.dev](https://crossbind.dev)**.
|
|
@@ -26,7 +26,7 @@ Their C++ wrappers, and the self-check the site build runs against numbers compu
|
|
|
26
26
|
Install the main package together with the platform builds:
|
|
27
27
|
|
|
28
28
|
```sh
|
|
29
|
-
npm install @crossbind/port-zstd @crossbind/port-zstd-wasm @crossbind/port-zstd-android @crossbind/port-zstd-ios
|
|
29
|
+
npm install @crossbind/port-zstd@beta @crossbind/port-zstd-wasm@beta @crossbind/port-zstd-android@beta @crossbind/port-zstd-ios@beta
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
Then import all three platforms in `crossbind.config.js` — crossbind compiles only the one matching each build target:
|
|
@@ -48,7 +48,7 @@ export default {
|
|
|
48
48
|
};
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
A native Node.js addon links the build of its platform:
|
|
51
|
+
A native Node.js addon (`crossbind build -e node`) links the build of its platform: `-p darwin`, `-p linux`, `-p linuxmusl` or `-p win32` takes `@crossbind/port-zstd-darwin`, `-linux`, `-linuxmusl` or `-win32`; `-linuxmusl` is the one for Alpine and other musl distributions. Install it and import its `crossbind.config.js` the same way.
|
|
52
52
|
|
|
53
53
|
## Usage
|
|
54
54
|
crossbind binds your C++ headers to JavaScript, so the usual pattern is a small wrapper around the library. This one compresses and decompresses in one call. Put it in your project's native folder (`src/native/` by default):
|
|
@@ -119,7 +119,7 @@ Each one runs in your browser on [crossbind.dev/ports/zstd](https://crossbind.de
|
|
|
119
119
|
- [Choose a level, a checksum and a window](https://crossbind.dev/ports/zstd/#03-parameters): `ZSTD_CCtx_setParameter`, read back with `ZSTD_getFrameHeader`.
|
|
120
120
|
- [Compress small messages with a dictionary](https://crossbind.dev/ports/zstd/#04-dictionary): train with `ZDICT_trainFromBuffer`, then compress against `ZSTD_createCDict` and `ZSTD_createDDict`.
|
|
121
121
|
|
|
122
|
-
Setup and differences per platform: [WebAssembly](https://crossbind.dev/ports/zstd/wasm/) · [Android](https://crossbind.dev/ports/zstd/android/) · [iOS](https://crossbind.dev/ports/zstd/ios/) · [macOS](https://crossbind.dev/ports/zstd/darwin/) · [Linux](https://crossbind.dev/ports/zstd/linux/) · [Windows](https://crossbind.dev/ports/zstd/win32/) · [WASI](https://crossbind.dev/ports/zstd/wasi/), which also has a command-line program built with `crossbind build -p wasi`.
|
|
122
|
+
Setup and differences per platform: [WebAssembly](https://crossbind.dev/ports/zstd/wasm/) · [Android](https://crossbind.dev/ports/zstd/android/) · [iOS](https://crossbind.dev/ports/zstd/ios/) · [macOS](https://crossbind.dev/ports/zstd/darwin/) · [Linux](https://crossbind.dev/ports/zstd/linux/) · [Windows](https://crossbind.dev/ports/zstd/win32/) · [WASI](https://crossbind.dev/ports/zstd/wasi/), which also has a command-line program built with `crossbind build -p wasi -e wasi`.
|
|
123
123
|
|
|
124
124
|
## What this build includes
|
|
125
125
|
- zstd 1.5.7 as a static library, with the dictionary builder (`ZDICT_*`) compiled in.
|
|
@@ -137,9 +137,11 @@ This is the main package; the precompiled binaries are shipped per platform:
|
|
|
137
137
|
| iOS | [`@crossbind/port-zstd-ios`](https://www.npmjs.com/package/@crossbind/port-zstd-ios) | device (`arm64`), simulator (`arm64`) |
|
|
138
138
|
| macOS | [`@crossbind/port-zstd-darwin`](https://www.npmjs.com/package/@crossbind/port-zstd-darwin) | `arm64` (Apple silicon), `x64` (Intel) — native Node.js addons |
|
|
139
139
|
| Linux | [`@crossbind/port-zstd-linux`](https://www.npmjs.com/package/@crossbind/port-zstd-linux) | `x64`, `arm64` — glibc 2.28 or later, native Node.js addons |
|
|
140
|
+
| Linux (musl) | [`@crossbind/port-zstd-linuxmusl`](https://www.npmjs.com/package/@crossbind/port-zstd-linuxmusl) | `x64`, `arm64` — musl 1.2.5 or later (Alpine 3.21 and later), native Node.js addons |
|
|
140
141
|
| Windows | [`@crossbind/port-zstd-win32`](https://www.npmjs.com/package/@crossbind/port-zstd-win32) | `x64`, `arm64` — Windows 10 or later, native Node.js addons |
|
|
141
142
|
| WASI library | [`@crossbind/port-zstd-wasi`](https://www.npmjs.com/package/@crossbind/port-zstd-wasi) | `wasm32-wasip3` — single-threaded |
|
|
142
|
-
| WASI command | [`@crossbind/port-zstd-
|
|
143
|
+
| WASI command | [`@crossbind/port-zstd-standalone-wasi`](https://www.npmjs.com/package/@crossbind/port-zstd-standalone-wasi) | the upstream `zstd` CLI as a `zstd-wasi` command (wasmtime 47+) |
|
|
144
|
+
| Node.js, ready-made | [`@crossbind/port-zstd-standalone-napi`](https://www.npmjs.com/package/@crossbind/port-zstd-standalone-napi) | prebuilt addons for macOS, Linux (glibc and musl) and Windows, `arm64` and `x64`: nothing to build |
|
|
143
145
|
|
|
144
146
|
## License
|
|
145
147
|
This project includes the precompiled zstd library, which is distributed under the [zstd License](https://github.com/facebook/zstd/blob/dev/LICENSE).
|
package/mergeConfig.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crossbind/port-zstd",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.63",
|
|
4
4
|
"nativeVersion": "1.5.7",
|
|
5
5
|
"description": "This package provides a libzstd library compiled with crossbind, enabling seamless usage of Zstandard (de)compression functionalities in JavaScript, WebAssembly and React Native projects.",
|
|
6
|
-
"homepage": "https://
|
|
6
|
+
"homepage": "https://crossbind.dev/ports/zstd/",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/crossbind/crossbind.git"
|