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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e2a6f6bf117cfe5135f48585ee93bb2766c68ab8467298302001721b5adeced2
4
- data.tar.gz: 387471e4a2ab11f043a6c4fc0b3a0c39f9874cd3d1d67342560ebfc3ae64e6be
3
+ metadata.gz: f28be888e23740db9ff57fe559725af7ef20d8069910fe0d42a5db2996e42238
4
+ data.tar.gz: 9a8769c8dfe35375871cba7953e8813c9a1854ba4b98deb37abe187414e9f942
5
5
  SHA512:
6
- metadata.gz: 8773d6f3cacb85ce37b5d898a04f2981fa67d1a34297eb62f701a2f2d3904c9d277a1c4168a425aa5aa6d7451be5ddfcb8a57f3bd2f14f7a65ee0bc2f2815a66
7
- data.tar.gz: 80977a20853890d1a2b53657702e62d54817784d07ae6917d6592aa52126e95b9f6e63f7a539ef30f7f1c828774c81e07c98b468cf6a0e43b3ea70f7cf70c616
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 Zstd (de)compression library binding for Ruby
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, Zstd!')
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
@@ -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
- File.open('zstdlib.c', 'w') do |file|
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