node-liblzma 1.1.6 → 1.1.9

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 CHANGED
@@ -1,3 +1,18 @@
1
+ # 1.1.9
2
+ * Fix building if no prebuilt binary found
3
+
4
+ # 1.1.7
5
+ * Fix build system
6
+ * Fix release system
7
+ * Fix documentation
8
+
9
+ # 1.1.0
10
+ * Refactor to deprecate Nan in favor of N-API
11
+ * Drop UBS building system to use standard `node-gyp`
12
+ * Support building on Linux, MacOSX and Windows
13
+ * Ability to build from preinstalled libraries as well as download from XZ website
14
+ * Deprecate Travis CI and AppVeyor to use GitHub Workflows
15
+
1
16
  # 1.0.5
2
17
  * Added CI for OSX and Windows
3
18
  * Implemented use of node-pre-gyp instead of node-gyp
package/README.md CHANGED
@@ -3,13 +3,13 @@ Node-liblzma
3
3
 
4
4
  [![NPM Version](https://img.shields.io/npm/v/node-liblzma.svg)](https://npmjs.org/package/node-liblzma)
5
5
  [![NPM Downloads](https://img.shields.io/npm/dm/node-liblzma.svg)](https://npmjs.org/package/node-liblzma)
6
- [![Build Status](https://travis-ci.org/oorabona/node-liblzma.png)](https://travis-ci.org/oorabona/node-liblzma)
7
- [![Dependency Status](https://david-dm.org/oorabona/node-liblzma.svg)](https://david-dm.org/oorabona/node-liblzma)
8
- [![devDependency Status](https://david-dm.org/oorabona/node-liblzma/dev-status.svg)](https://david-dm.org/oorabona/node-liblzma#info=devDependencies)
6
+ [![Test on Linux](https://github.com/oorabona/node-liblzma/actions/workflows/ci-linux.yml/badge.svg)](https://github.com/oorabona/node-liblzma/actions/workflows/ci-linux.yml)
7
+ [![Test on MacOS](https://github.com/oorabona/node-liblzma/actions/workflows/ci-macos.yml/badge.svg)](https://github.com/oorabona/node-liblzma/actions/workflows/ci-macos.yml)
8
+ [![Test on Windows](https://github.com/oorabona/node-liblzma/actions/workflows/ci-windows.yml/badge.svg)](https://github.com/oorabona/node-liblzma/actions/workflows/ci-windows.yml)
9
9
 
10
10
  # What is liblzma/XZ ?
11
11
 
12
- [XZ](http://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:
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. And possibly others...
30
+ But the library can open and read any LZMA1 or LZMA2 compressed file.
31
31
 
32
32
  # What's new ?
33
33
 
34
- Supports all NodeJS versions, thanks to [nan](https://github.com/nodejs/nan) !
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 (tested with Travis)
38
- - Raspberry Pi 2 (armv7l 32-bits)
39
- - Raspberry Pi 3 (armv8l but still a 32 bits Raspbian)
40
- - Windows (ongoing tests)
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('lzma');
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
- If you want to enable threading support in the module, then opt in with:
134
+ --OR--
105
135
 
106
- ``` bash
107
- $ ENABLE_MT=1 npm install node-liblzma --save
136
+ ```sh
137
+ $ yarn add node-liblzma
108
138
  ```
109
139
 
110
- > This will of course work only if you have a binary version of liblzma with threading enabled.
111
- If this is not the case, it will not fail (even at runtime). It justs won't work.
112
- To check if this is enabled or not, run the [tests suite](#tests)
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
- In both cases, it will try to download an existing pre-compiled module binary and if none exists it will build it.
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. Automatic download and compilation of `xz` libs, and statically link against node module
119
- 3. Compile `xz` yourself, outside `node-liblzma` and build node module with dynamically linked library
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
- $ COMPILE=1 npm install --save node-liblzma
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)