zstdlib 0.1.0-x64-mingw32 → 0.1.1-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +10 -0
- data/README.md +6 -5
- data/ext/zstdlib/extconf.rb +11 -5
- data/lib/2.2/zstdlib.so +0 -0
- data/lib/2.3/zstdlib.so +0 -0
- data/lib/2.4/zstdlib.so +0 -0
- data/lib/2.5/zstdlib.so +0 -0
- data/lib/2.6/zstdlib.so +0 -0
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f2de100633dcb53e30130bd57ea22fc33b41c97ad52c40ccc9fab03ea04ece2
|
4
|
+
data.tar.gz: 23eb114a96ef1a18f2efa637eec8536ad6bf984ca2ce3a609dcf946067dc9047
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ff53a115a045bfd4700c16d7fd6cdf3b9339c2ca82b52163e1ffcd8512faf79cad4ab3a598e1f3efeaac44c109a15ecc39b35f1b34624b0e797eed6b6369288
|
7
|
+
data.tar.gz: 56f869456b6c5a4974cd43b9324e723692411e3198b13cd6f972c1fb6c6ce003acac4e1d36a1d905e1ca98cfbae9a3b703a26fda7664eee31c90a234664dedf0
|
data/CHANGES.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
# 0.1.1
|
2
|
+
|
3
|
+
Pick up the most recent compatible source for _zstdlib_ Ruby extension module instead of target Ruby version.
|
4
|
+
|
5
|
+
Replaced (most) references to `Zlib` with `Zstdlib` within extractable documentation.
|
6
|
+
|
7
|
+
Fixed a few missing methods on Ruby side.
|
8
|
+
|
9
|
+
Documentation updates.
|
10
|
+
|
1
11
|
# 0.1.0
|
2
12
|
|
3
13
|
Initial release.
|
data/README.md
CHANGED
@@ -77,13 +77,14 @@ Source code and Windows-specific multi-versioned binary gems can be obtained fro
|
|
77
77
|
|
78
78
|
## Release history
|
79
79
|
|
80
|
-
For user-visible changes refer to [change log](CHANGES.md).
|
80
|
+
For user-visible changes refer to [change log](/CHANGES.md).
|
81
81
|
|
82
82
|
## Caveats
|
83
83
|
|
84
|
-
|
85
|
-
|
86
|
-
|
84
|
+
This module is in testing phase so things beyond basic interface might not work as expected.
|
85
|
+
|
86
|
+
Documentation extracted from _zstdlib_ still contains traces of old zlib-related pieces.
|
87
|
+
Just keep this in mind and substitute *zlib* with *zstdlib* upon browsing.
|
87
88
|
|
88
89
|
Gzip support, although available in Zstd's Zlib compatibility layer, is currently disabled.
|
89
90
|
|
@@ -93,4 +94,4 @@ Zstd's external compression dictionaries capability is not (yet) implemented.
|
|
93
94
|
|
94
95
|
Cheers,
|
95
96
|
|
96
|
-
Oleg A. Khlybov <fougas@mail.ru>
|
97
|
+
Oleg A. Khlybov <[fougas@mail.ru](mailto:fougas@mail.ru)>
|
data/ext/zstdlib/extconf.rb
CHANGED
@@ -3,31 +3,37 @@
|
|
3
3
|
require 'mkmf'
|
4
4
|
require 'fileutils'
|
5
5
|
|
6
|
+
include RbConfig
|
6
7
|
include FileUtils
|
7
8
|
|
8
9
|
ZSTD_VERSION = '1.3.8'
|
9
10
|
ZLIB_VERSION = '1.2.11'
|
10
|
-
RB_VERSION =
|
11
|
+
RB_VERSION = CONFIG['MAJOR']+'.'+CONFIG['MINOR']
|
12
|
+
ZMOD_VERSION = RB_VERSION >= '2.3' ? '2.6' : RB_VERSION # Review requirements with every new zlib module release!
|
11
13
|
|
12
14
|
root = File.dirname(__FILE__)
|
13
15
|
|
14
|
-
zmod = File.expand_path "ruby/zlib-#{
|
16
|
+
zmod = File.expand_path "ruby/zlib-#{ZMOD_VERSION}", root
|
15
17
|
zlib = File.expand_path "zlib-#{ZLIB_VERSION}", root
|
16
18
|
zstd = File.expand_path "zstd-#{ZSTD_VERSION}/lib", root
|
17
19
|
zlibwrapper = File.expand_path "zstd-#{ZSTD_VERSION}/zlibWrapper", root
|
18
20
|
|
19
21
|
File.open('zstdlib.c', 'w') do |file|
|
22
|
+
file << %~\n#include <zstd.h>\n~
|
20
23
|
file << File.read("#{zmod}/zlib.c").
|
21
|
-
gsub(
|
22
|
-
gsub(/
|
24
|
+
gsub(%~Init_zlib~, %~Init_zstdlib~).
|
25
|
+
gsub(/"([Zz])lib"/, '"\1stdlib"').
|
26
|
+
gsub(/Zlib(\.|::)/, 'Zstdlib\1').
|
23
27
|
gsub(%~<zlib.h>~, %~<zstd_zlibwrapper.h>~).
|
28
|
+
gsub(%~Z_DEFAULT_COMPRESSION~, %~ZSTD_CLEVEL_DEFAULT~).
|
24
29
|
gsub(%~Z_BEST_COMPRESSION~, %~ZSTD_maxCLevel()~)
|
30
|
+
file << %~\n/* Ruby: #{RB_VERSION} Zlib: #{ZMOD_VERSION} */\n~
|
25
31
|
end
|
26
32
|
|
27
33
|
$srcs = ['zstdlib.c']
|
28
34
|
|
29
35
|
$CFLAGS += ' -fomit-frame-pointer -ffast-math -O3'
|
30
|
-
$CPPFLAGS += " -I#{zlib} -I#{zlibwrapper} -I#{zstd}
|
36
|
+
$CPPFLAGS += " -I#{zlib} -I#{zlibwrapper} -I#{zstd} -DZWRAP_USE_ZSTD=1 -DGZIP_SUPPORT=0"
|
31
37
|
$LDFLAGS += ' -s'
|
32
38
|
$LOCAL_LIBS += ' libzlibwrapper.a libz.a libzstd.a'
|
33
39
|
|
data/lib/2.2/zstdlib.so
CHANGED
Binary file
|
data/lib/2.3/zstdlib.so
CHANGED
Binary file
|
data/lib/2.4/zstdlib.so
CHANGED
Binary file
|
data/lib/2.5/zstdlib.so
CHANGED
Binary file
|
data/lib/2.6/zstdlib.so
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zstdlib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: x64-mingw32
|
6
6
|
authors:
|
7
7
|
- Oleg A. Khlybov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -66,7 +66,21 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.7.2
|
69
|
-
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: test-unit
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: A Zlib drop-in replacement implementing Zstandard compression algorithm
|
70
84
|
email:
|
71
85
|
- fougas@mail.ru
|
72
86
|
executables: []
|
@@ -201,5 +215,5 @@ rubyforge_project:
|
|
201
215
|
rubygems_version: 2.7.9
|
202
216
|
signing_key:
|
203
217
|
specification_version: 4
|
204
|
-
summary: Ruby interface for the Zstd
|
218
|
+
summary: Ruby interface for the Zstd data compression library
|
205
219
|
test_files: []
|