zstdlib 0.1.1 → 0.1.2
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.
- checksums.yaml +4 -4
- data/CHANGES.md +8 -0
- data/README.md +5 -2
- data/ext/zstdlib/extconf.rb +1 -11
- data/ext/zstdlib/ruby/zlib-2.2/{zlib.c → zstdlib.c} +279 -263
- data/ext/zstdlib/ruby/zlib-2.3/{zlib.c → zstdlib.c} +281 -265
- data/ext/zstdlib/ruby/zlib-2.4/{zlib.c → zstdlib.c} +290 -274
- data/ext/zstdlib/ruby/zlib-2.5/{zlib.c → zstdlib.c} +290 -274
- data/ext/zstdlib/ruby/zlib-2.6/{zlib.c → zstdlib.c} +290 -274
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f28be888e23740db9ff57fe559725af7ef20d8069910fe0d42a5db2996e42238
|
4
|
+
data.tar.gz: 9a8769c8dfe35375871cba7953e8813c9a1854ba4b98deb37abe187414e9f942
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88c804a87824f1c81b294fc4e31fbc1c4be854c8bcf834361aaffa80ca959641fc749b1419fc999c3f2303446361cfb78ddf00153b2c8f120eb14a3eb53fa2ef
|
7
|
+
data.tar.gz: d614ff4cee9565faf5de117d4287adabdf273c32833ce5f410039c16e0fc62276f44c0fb5428154f5a89d034fb7dbb4efbd768e1d19babdd1c92deb7d1da3a9e
|
data/CHANGES.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
# 0.1.2
|
2
|
+
|
3
|
+
Implemented `Zstdlib::ZSTD_VERSION` constant and `Zstdlib.zstd_version` module method for Zstd version retrieval.
|
4
|
+
|
5
|
+
Documentation updates.
|
6
|
+
|
7
|
+
|
1
8
|
# 0.1.1
|
2
9
|
|
3
10
|
Pick up the most recent compatible source for _zstdlib_ Ruby extension module instead of target Ruby version.
|
@@ -8,6 +15,7 @@ Fixed a few missing methods on Ruby side.
|
|
8
15
|
|
9
16
|
Documentation updates.
|
10
17
|
|
18
|
+
|
11
19
|
# 0.1.0
|
12
20
|
|
13
21
|
Initial release.
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# [Zstdlib](https://bitbucket.org/fougas/zstdlib) - a
|
1
|
+
# [Zstdlib](https://bitbucket.org/fougas/zstdlib) - a Zstandard data compression library binding for Ruby
|
2
2
|
|
3
3
|
_zstdlib_ is native Ruby extension for [Zstandard](https://facebook.github.io/zstd/) data compression library.
|
4
4
|
|
@@ -17,7 +17,7 @@ Streams produced by `Zstdlib::Deflate` can be decompressed with standard _zstd_
|
|
17
17
|
### Simple string compression
|
18
18
|
````ruby
|
19
19
|
require 'zstdlib'
|
20
|
-
data = Zstdlib.deflate('Hello
|
20
|
+
data = Zstdlib.deflate('Hello Zstd')
|
21
21
|
````
|
22
22
|
|
23
23
|
### Incremental data compression
|
@@ -47,6 +47,9 @@ _zstdlib_ covers the following parts of _zlib_:
|
|
47
47
|
Note that _zstdlib_ currently omits Gzip file support with its `GzipFile`, `GzipReader` and `GzipWriter` classes
|
48
48
|
and associated constants although this may be changed in future.
|
49
49
|
|
50
|
+
There exist `Zstdlib::ZSTD_VERSION` constant and `Zstdlib.zstd_version` module method which can be used to obtain shipped Zstd library version.
|
51
|
+
|
52
|
+
|
50
53
|
### General guidelines
|
51
54
|
|
52
55
|
In order to enable Zstd (de)compression capability in existing code, simply replace _zlib_ with _zstdlib_ in require statements and
|
data/ext/zstdlib/extconf.rb
CHANGED
@@ -18,17 +18,7 @@ zlib = File.expand_path "zlib-#{ZLIB_VERSION}", root
|
|
18
18
|
zstd = File.expand_path "zstd-#{ZSTD_VERSION}/lib", root
|
19
19
|
zlibwrapper = File.expand_path "zstd-#{ZSTD_VERSION}/zlibWrapper", root
|
20
20
|
|
21
|
-
|
22
|
-
file << %~\n#include <zstd.h>\n~
|
23
|
-
file << File.read("#{zmod}/zlib.c").
|
24
|
-
gsub(%~Init_zlib~, %~Init_zstdlib~).
|
25
|
-
gsub(/"([Zz])lib"/, '"\1stdlib"').
|
26
|
-
gsub(/Zlib(\.|::)/, 'Zstdlib\1').
|
27
|
-
gsub(%~<zlib.h>~, %~<zstd_zlibwrapper.h>~).
|
28
|
-
gsub(%~Z_DEFAULT_COMPRESSION~, %~ZSTD_CLEVEL_DEFAULT~).
|
29
|
-
gsub(%~Z_BEST_COMPRESSION~, %~ZSTD_maxCLevel()~)
|
30
|
-
file << %~\n/* Ruby: #{RB_VERSION} Zlib: #{ZMOD_VERSION} */\n~
|
31
|
-
end
|
21
|
+
cp "#{zmod}/zstdlib.c", 'zstdlib.c'
|
32
22
|
|
33
23
|
$srcs = ['zstdlib.c']
|
34
24
|
|