zlib 1.0.0 → 2.1.1
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 +5 -5
- data/README.md +2 -4
- data/ext/zlib/extconf.rb +9 -4
- data/ext/zlib/zlib.c +361 -182
- data/zlib.gemspec +15 -9
- metadata +9 -57
- data/.gitignore +0 -12
- data/.travis.yml +0 -7
- data/Gemfile +0 -4
- data/Rakefile +0 -13
- data/bin/console +0 -14
- data/bin/setup +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 38b96853c00eb5d1b6b2ad47512fc97d4f4c589e77106dd6cc7f501a3de7ce0c
|
4
|
+
data.tar.gz: 8fc6e8d0207cc631d85a2cb248502263faf6b2184fab4de0c762d360c95b482f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b9a862a80f4b7146e5d918b917990349ed3be78c8636346636f787b6955c764406717330d1206ec8ea9347149ebe544d03e571c8e9754840f1fd6ac38b794df
|
7
|
+
data.tar.gz: ca43a10903aa4c981f8de059fd12c695ec4a31b2e8c5ccf34161f828f059660108d7406851c416f90eca9d54f07332cab606c305f566b5b0dac805a94b57e573
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# Zlib
|
2
2
|
|
3
|
-
[
|
4
|
-
|
5
|
-
This module provides access to the {zlib library}[http://zlib.net]. Zlib is designed to be a portable, free, general-purpose, legally unencumbered -- that is, not covered by any patents -- lossless data-compression library for use on virtually any computer hardware and operating system.
|
3
|
+
This module provides access to the [zlib library](http://zlib.net). Zlib is designed to be a portable, free, general-purpose, legally unencumbered -- that is, not covered by any patents -- lossless data-compression library for use on virtually any computer hardware and operating system.
|
6
4
|
|
7
5
|
The zlib compression library provides in-memory compression and decompression functions, including integrity checks of the uncompressed data.
|
8
6
|
|
@@ -34,7 +32,7 @@ Or install it yourself as:
|
|
34
32
|
|
35
33
|
Using the wrapper to compress strings with default parameters is quite simple:
|
36
34
|
|
37
|
-
```
|
35
|
+
```ruby
|
38
36
|
require "zlib"
|
39
37
|
|
40
38
|
data_to_compress = File.read("don_quixote.txt")
|
data/ext/zlib/extconf.rb
CHANGED
@@ -10,11 +10,12 @@ require 'rbconfig'
|
|
10
10
|
|
11
11
|
dir_config 'zlib'
|
12
12
|
|
13
|
-
|
13
|
+
libs = $libs
|
14
14
|
if %w'z libz zlib1 zlib zdll zlibwapi'.find {|z| have_library(z, 'deflateReset')} and
|
15
15
|
have_header('zlib.h') then
|
16
16
|
have_zlib = true
|
17
17
|
else
|
18
|
+
$libs = libs
|
18
19
|
unless File.directory?(zsrc = "#{$srcdir}/zlib")
|
19
20
|
dirs = Dir.open($srcdir) {|z| z.grep(/\Azlib-\d+[.\d]*\z/) {|x|"#{$srcdir}/#{x}"}}
|
20
21
|
dirs.delete_if {|x| !File.directory?(x)}
|
@@ -31,9 +32,12 @@ else
|
|
31
32
|
$extso << dll
|
32
33
|
$cleanfiles << "$(topdir)/#{dll}" << "$(ZIMPLIB)"
|
33
34
|
zmk = "\t$(MAKE) -f $(ZMKFILE) TOP=$(ZSRC)"
|
35
|
+
zopts = []
|
34
36
|
if $nmake
|
35
37
|
zmkfile = "$(ZSRC)/win32/Makefile.msc"
|
36
38
|
m = "#{zsrc}/win32/Makefile.msc"
|
39
|
+
# zopts << "USE_ASM=1"
|
40
|
+
zopts << "ARCH=#{RbConfig::CONFIG['target_cpu']}"
|
37
41
|
else
|
38
42
|
zmkfile = "$(ZSRC)/win32/Makefile.gcc"
|
39
43
|
m = "#{zsrc}/win32/Makefile.gcc"
|
@@ -43,7 +47,7 @@ else
|
|
43
47
|
end
|
44
48
|
m = File.read(m)
|
45
49
|
zimplib = m[/^IMPLIB[ \t]*=[ \t]*(\S+)/, 1]
|
46
|
-
$LOCAL_LIBS << " " << zimplib
|
50
|
+
($LOCAL_LIBS << " ./" << zimplib).strip!
|
47
51
|
unless $nmake or /^TOP[ \t]/ =~ m
|
48
52
|
m.gsub!(/win32\/zlib\.def/, '$(TOP)/\&')
|
49
53
|
m.gsub!(/^(\t.*[ \t])(\S+\.rc)/, '\1-I$(<D) $<')
|
@@ -55,10 +59,11 @@ else
|
|
55
59
|
addconf.push(
|
56
60
|
"ZMKFILE = #{zmkfile}\n",
|
57
61
|
"ZIMPLIB = #{zimplib}\n",
|
62
|
+
"ZOPTS = #{zopts.join(' ')}\n",
|
58
63
|
"$(TARGET_SO): $(ZIMPLIB)\n",
|
59
64
|
"$(ZIMPLIB):\n",
|
60
|
-
"#{zmk} $@\n",
|
61
|
-
"install-so: $(topdir)/#{dll}",
|
65
|
+
"#{zmk} $(ZOPTS) $@\n",
|
66
|
+
"install-so static: $(topdir)/#{dll}",
|
62
67
|
"$(topdir)/#{dll}: $(ZIMPLIB)\n",
|
63
68
|
"\t$(Q) $(COPY) #{dll} $(@D)\n",
|
64
69
|
"clean: clean-zsrc\n",
|