node-liblzma 1.1.5 → 1.1.8
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/History.md +13 -0
- package/README.md +55 -29
- package/binding.gyp +553 -626
- package/lib/lzma.js +381 -0
- package/package.json +6 -7
- package/prebuilds/darwin-x64/node.napi.node +0 -0
- package/prebuilds/linux-x64/node.napi.node +0 -0
- package/prebuilds/win32-x64/node.napi.node +0 -0
- package/prebuilds/linux-x64/node_lzma.node +0 -0
- package/prebuilds/mac-x64/node_lzma.node +0 -0
- package/prebuilds/win-x64/node_lzma.node +0 -0
package/History.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
# 1.1.7
|
|
2
|
+
* Fix build system
|
|
3
|
+
* Fix release system
|
|
4
|
+
* Fix documentation
|
|
5
|
+
* Fix building if no prebuilt binary found
|
|
6
|
+
|
|
7
|
+
# 1.1.0
|
|
8
|
+
* Refactor to deprecate Nan in favor of N-API
|
|
9
|
+
* Drop UBS building system to use standard `node-gyp`
|
|
10
|
+
* Support building on Linux, MacOSX and Windows
|
|
11
|
+
* Ability to build from preinstalled libraries as well as download from XZ website
|
|
12
|
+
* Deprecate Travis CI and AppVeyor to use GitHub Workflows
|
|
13
|
+
|
|
1
14
|
# 1.0.5
|
|
2
15
|
* Added CI for OSX and Windows
|
|
3
16
|
* Implemented use of node-pre-gyp instead of node-gyp
|
package/README.md
CHANGED
|
@@ -3,13 +3,13 @@ Node-liblzma
|
|
|
3
3
|
|
|
4
4
|
[](https://npmjs.org/package/node-liblzma)
|
|
5
5
|
[](https://npmjs.org/package/node-liblzma)
|
|
6
|
-
[](https://github.com/oorabona/node-liblzma/actions/workflows/ci-linux.yml)
|
|
7
|
+
[](https://github.com/oorabona/node-liblzma/actions/workflows/ci-macos.yml)
|
|
8
|
+
[](https://github.com/oorabona/node-liblzma/actions/workflows/ci-windows.yml)
|
|
9
9
|
|
|
10
10
|
# What is liblzma/XZ ?
|
|
11
11
|
|
|
12
|
-
[XZ](
|
|
12
|
+
[XZ](https://tukaani.org/xz/xz-file-format.txt) is a container for compressed archives. It is among the best compressors out there according to several benchmarks:
|
|
13
13
|
* [Gzip vs Bzip2 vs LZMA vs XZ vs LZ4 vs LZO](http://pokecraft.first-world.info/wiki/Quick_Benchmark:_Gzip_vs_Bzip2_vs_LZMA_vs_XZ_vs_LZ4_vs_LZO)
|
|
14
14
|
* [Large Text Compression Benchmark](http://mattmahoney.net/dc/text.html#2118)
|
|
15
15
|
* [Linux Compression Comparison (GZIP vs BZIP2 vs LZMA vs ZIP vs Compress)](http://bashitout.com/2009/08/30/Linux-Compression-Comparison-GZIP-vs-BZIP2-vs-LZMA-vs-ZIP-vs-Compress.html)
|
|
@@ -27,17 +27,47 @@ You can either use system packages or download a specific version and compile it
|
|
|
27
27
|
See [installation](#installation) below.
|
|
28
28
|
|
|
29
29
|
> Only LZMA2 is supported for compression output.
|
|
30
|
-
But the library can open and read any LZMA1 or LZMA2 compressed file.
|
|
30
|
+
But the library can open and read any LZMA1 or LZMA2 compressed file.
|
|
31
31
|
|
|
32
32
|
# What's new ?
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
It has been quite some time since I first published this package.
|
|
35
|
+
In the meantime, [N-API](https://nodejs.org/api/n-api.html) eventually became the _de facto_ standard to provide stable ABI API for NodeJS Native Modules.
|
|
36
|
+
|
|
37
|
+
It therefore replaces good ol' [nan](https://github.com/nodejs/nan) !
|
|
38
|
+
|
|
39
|
+
It supports all NodeJS versions >= 12 and lots has been done to change CICD pipelines and testing.
|
|
40
|
+
|
|
35
41
|
It has been tested and works on:
|
|
36
42
|
- Linux x64 (Ubuntu)
|
|
37
|
-
- OSX (
|
|
38
|
-
- Raspberry Pi 2 (
|
|
39
|
-
-
|
|
40
|
-
|
|
43
|
+
- OSX (`macos-11`)
|
|
44
|
+
- Raspberry Pi 2/3/4 (both on 32-bit and 64-bit architectures)
|
|
45
|
+
- Windows (`windows-2019` and `windows-2022` are part of GitHub CI)
|
|
46
|
+
|
|
47
|
+
> Notes:
|
|
48
|
+
> - For [Windows](https://github.com/oorabona/node-liblzma/actions/workflows/ci-windows.yml)
|
|
49
|
+
> There is no "global" installation of the LZMA library on the Windows machine provisionned by GitHub, so it is pointless to build with this config
|
|
50
|
+
- For [Linux](https://github.com/oorabona/node-liblzma/actions/workflows/ci-linux.yml)
|
|
51
|
+
- For [MacOS](https://github.com/oorabona/node-liblzma/actions/workflows/ci-macos.yml)
|
|
52
|
+
|
|
53
|
+
## Prebuilt images
|
|
54
|
+
|
|
55
|
+
Several prebuilt versions are bundled within the package.
|
|
56
|
+
- Windows x86_64
|
|
57
|
+
- Linux x86_64
|
|
58
|
+
- MacOS x86_64 / Arm64
|
|
59
|
+
|
|
60
|
+
If your OS/architecture matches, you will use this version which has been compiled using the following default flags:
|
|
61
|
+
|
|
62
|
+
Flag | Description | Default value | Possible values
|
|
63
|
+
-----|-------------|---------------|----------------
|
|
64
|
+
USE_GLOBAL | Should the library use the system provided DLL/.so library ? | `yes` (`no` if OS is Windows) | `yes` or `no`
|
|
65
|
+
RUNTIME_LINK | Should the library be linked statically or use the shared LZMA library ? | `shared` | `static` or `shared`
|
|
66
|
+
ENABLE_THREAD_SUPPORT | Does the LZMA library support threads ? | `yes` | `yes` or `no`
|
|
67
|
+
|
|
68
|
+
If not `node-gyp` will automagically start compiling stuff according to the environment variables set, or the default values above.
|
|
69
|
+
|
|
70
|
+
If you want to change compilation flags, please read on [here](#installation).
|
|
41
71
|
|
|
42
72
|
# Related projects
|
|
43
73
|
|
|
@@ -53,7 +83,7 @@ A very complete implementation of XZ library bindings
|
|
|
53
83
|
# API comparison
|
|
54
84
|
|
|
55
85
|
```js
|
|
56
|
-
var lzma = require('
|
|
86
|
+
var lzma = require('node-liblzma');
|
|
57
87
|
```
|
|
58
88
|
|
|
59
89
|
Zlib | XZlib | Arguments
|
|
@@ -101,22 +131,25 @@ Well, as simple as this one-liner:
|
|
|
101
131
|
$ npm i node-liblzma --save
|
|
102
132
|
```
|
|
103
133
|
|
|
104
|
-
|
|
134
|
+
--OR--
|
|
105
135
|
|
|
106
|
-
```
|
|
107
|
-
$
|
|
136
|
+
```sh
|
|
137
|
+
$ yarn add node-liblzma
|
|
108
138
|
```
|
|
109
139
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
140
|
+
If you want to recompile the source, for example to disable threading support in the module, then you have to opt out with:
|
|
141
|
+
|
|
142
|
+
``` bash
|
|
143
|
+
$ ENABLE_THREAD_SUPPORT=no npm install node-liblzma --build-from-source
|
|
144
|
+
```
|
|
113
145
|
|
|
114
|
-
|
|
146
|
+
> Note:
|
|
147
|
+
Enabling thread support in the library will **NOT** work if the LZMA library itself has been built without such support.
|
|
115
148
|
|
|
116
149
|
To build the module, you have the following options:
|
|
117
150
|
1. Using system development libraries
|
|
118
|
-
2.
|
|
119
|
-
3. Compile `xz` yourself, outside `node-liblzma
|
|
151
|
+
2. Ask the build system to download `xz` and build it
|
|
152
|
+
3. Compile `xz` yourself, outside `node-liblzma`, and have it use it after
|
|
120
153
|
|
|
121
154
|
## Using system dev libraries to compile
|
|
122
155
|
|
|
@@ -129,22 +162,15 @@ You need to have the development package installed on your system. If you have D
|
|
|
129
162
|
## Automatic download and compilation to statically link `xz`
|
|
130
163
|
|
|
131
164
|
If you do not plan on having a local install, you can ask for automatic download and build of whatever version of `xz` you want.
|
|
132
|
-
With the use of [UBS](https://github.com/oorabona/ubs), you do not need to download/configure/install `xz` yourself anymore.
|
|
133
165
|
|
|
134
166
|
Just do:
|
|
135
167
|
|
|
136
168
|
```sh
|
|
137
|
-
$
|
|
169
|
+
$ npm install node-liblzma --build-from-source
|
|
138
170
|
```
|
|
139
171
|
|
|
140
172
|
When no option is given in the commandline arguments, it will build with default values.
|
|
141
173
|
|
|
142
|
-
If you want to build __experimental__ multi-threading feature, you can build `xz` with threads enabled just for this library by running:
|
|
143
|
-
|
|
144
|
-
```sh
|
|
145
|
-
$ ENABLE_MT=1 COMPILE=1 npm install --save node-liblzma
|
|
146
|
-
```
|
|
147
|
-
|
|
148
174
|
## Local install of `xz` sources (outside `node-liblzma`)
|
|
149
175
|
|
|
150
176
|
So you did install `xz` somewhere outside the module and want the module to use it.
|
|
@@ -196,4 +222,4 @@ I did not yet figure how to fix this except by masking the warning..
|
|
|
196
222
|
|
|
197
223
|
# License
|
|
198
224
|
|
|
199
|
-
This software is released under LGPL3.0+
|
|
225
|
+
This software is released under [LGPL3.0+](LICENSE)
|