zstdlib 0.1.0-x86-mingw32 → 0.1.1-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ca9afd7456f2dbce0f0f12d12f67901d0ed2b363652f0f6ae3fc7d6c4488731
4
- data.tar.gz: 1605a7d9aba92e69fbe55e0cef92d6eeedf1e0337d52fa9538cd5beb99cad960
3
+ metadata.gz: ff22509e47b0f6a6809721e66bdec3f370417d5fbfffcf6760ee4c21d5eb0cc4
4
+ data.tar.gz: 43ed01fefa61a66a2bd046d6efa513284001fda02e98fafa59cd0b2d4ac2f826
5
5
  SHA512:
6
- metadata.gz: 69fe0e161f25676c7c1a3c70dcb3e6b717301f294b86e6f5981d6d0d6a1f985750de66e1bbf27d74114f1d16a5ab2153a5ad051a90ea77762053ffabc09c7067
7
- data.tar.gz: ed0cd3ae52582ea6e07542d0d60dffc3bf1394c46da8afcbbdbfafecdf6c184c0e5372bce563262fccdf13fe8e9b528040a57dc205caf3519afa8cfac7783e4d
6
+ metadata.gz: 1fab81d4ee59096373cc476d6a3c774de1fff9a1196acb566e887d7aff458fb236a0a001a361637792496458a2d4a77a13dd19bd37ee4fbfef39016eef63f0eb
7
+ data.tar.gz: 92264d3bebd4955e360c590f458643955bd6514efa6148732fe2c8569a8eee8f1c06a67e21c348fb4fb7b99cb601b645effb0dffe88d7af7ac81e27fa042723f
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
- Ruby documentation extraction tools (such as RDoc) produce incorrect documentation for _zstdlib_
85
- which is technically valid but contains all identifies referring to _zlib_.
86
- This may change in future.
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)>
@@ -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 = Gem.ruby_api_version.slice(/^\d+\.\d+/)
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-#{RB_VERSION}", root
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(/Init_zlib/, 'Init_zstdlib').
22
- gsub(/rb_define_module.*/, 'rb_define_module("Zstdlib");').
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}/lib -DZWRAP_USE_ZSTD=1 -DGZIP_SUPPORT=0"
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.0
4
+ version: 0.1.1
5
5
  platform: x86-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 00:00:00.000000000 Z
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
- description: Zlib drop-in replacement implementing Zstd (de)compression algorithm
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 (de)compression library
218
+ summary: Ruby interface for the Zstd data compression library
205
219
  test_files: []