extzstd 0.0.3.CONCEPT → 0.3.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/HISTORY.ja.md +39 -0
- data/LICENSE +6 -6
- data/README.md +26 -45
- data/contrib/zstd/CHANGELOG +555 -0
- data/contrib/zstd/CODE_OF_CONDUCT.md +5 -0
- data/contrib/zstd/CONTRIBUTING.md +392 -0
- data/contrib/zstd/COPYING +339 -0
- data/contrib/zstd/LICENSE +13 -9
- data/contrib/zstd/Makefile +414 -0
- data/contrib/zstd/README.md +170 -45
- data/contrib/zstd/TESTING.md +44 -0
- data/contrib/zstd/appveyor.yml +289 -0
- data/contrib/zstd/lib/BUCK +234 -0
- data/contrib/zstd/lib/Makefile +354 -0
- data/contrib/zstd/lib/README.md +179 -0
- data/contrib/zstd/{common → lib/common}/bitstream.h +170 -130
- data/contrib/zstd/lib/common/compiler.h +175 -0
- data/contrib/zstd/lib/common/cpu.h +215 -0
- data/contrib/zstd/lib/common/debug.c +24 -0
- data/contrib/zstd/lib/common/debug.h +114 -0
- data/contrib/zstd/{common → lib/common}/entropy_common.c +79 -94
- data/contrib/zstd/lib/common/error_private.c +55 -0
- data/contrib/zstd/lib/common/error_private.h +80 -0
- data/contrib/zstd/{common → lib/common}/fse.h +153 -93
- data/contrib/zstd/{common → lib/common}/fse_decompress.c +37 -82
- data/contrib/zstd/lib/common/huf.h +340 -0
- data/contrib/zstd/{common → lib/common}/mem.h +154 -78
- data/contrib/zstd/lib/common/pool.c +344 -0
- data/contrib/zstd/lib/common/pool.h +84 -0
- data/contrib/zstd/lib/common/threading.c +121 -0
- data/contrib/zstd/lib/common/threading.h +155 -0
- data/contrib/zstd/{common → lib/common}/xxhash.c +85 -75
- data/contrib/zstd/{common → lib/common}/xxhash.h +85 -73
- data/contrib/zstd/lib/common/zstd_common.c +83 -0
- data/contrib/zstd/lib/common/zstd_errors.h +94 -0
- data/contrib/zstd/lib/common/zstd_internal.h +447 -0
- data/contrib/zstd/{compress → lib/compress}/fse_compress.c +194 -303
- data/contrib/zstd/lib/compress/hist.c +183 -0
- data/contrib/zstd/lib/compress/hist.h +75 -0
- data/contrib/zstd/lib/compress/huf_compress.c +798 -0
- data/contrib/zstd/lib/compress/zstd_compress.c +4278 -0
- data/contrib/zstd/lib/compress/zstd_compress_internal.h +1125 -0
- data/contrib/zstd/lib/compress/zstd_compress_literals.c +158 -0
- data/contrib/zstd/lib/compress/zstd_compress_literals.h +29 -0
- data/contrib/zstd/lib/compress/zstd_compress_sequences.c +419 -0
- data/contrib/zstd/lib/compress/zstd_compress_sequences.h +54 -0
- data/contrib/zstd/lib/compress/zstd_compress_superblock.c +845 -0
- data/contrib/zstd/lib/compress/zstd_compress_superblock.h +32 -0
- data/contrib/zstd/lib/compress/zstd_cwksp.h +525 -0
- data/contrib/zstd/lib/compress/zstd_double_fast.c +521 -0
- data/contrib/zstd/lib/compress/zstd_double_fast.h +38 -0
- data/contrib/zstd/lib/compress/zstd_fast.c +496 -0
- data/contrib/zstd/lib/compress/zstd_fast.h +37 -0
- data/contrib/zstd/lib/compress/zstd_lazy.c +1138 -0
- data/contrib/zstd/lib/compress/zstd_lazy.h +67 -0
- data/contrib/zstd/lib/compress/zstd_ldm.c +619 -0
- data/contrib/zstd/lib/compress/zstd_ldm.h +110 -0
- data/contrib/zstd/lib/compress/zstd_opt.c +1200 -0
- data/contrib/zstd/lib/compress/zstd_opt.h +56 -0
- data/contrib/zstd/lib/compress/zstdmt_compress.c +2143 -0
- data/contrib/zstd/lib/compress/zstdmt_compress.h +192 -0
- data/contrib/zstd/lib/decompress/huf_decompress.c +1248 -0
- data/contrib/zstd/lib/decompress/zstd_ddict.c +244 -0
- data/contrib/zstd/lib/decompress/zstd_ddict.h +44 -0
- data/contrib/zstd/lib/decompress/zstd_decompress.c +1885 -0
- data/contrib/zstd/lib/decompress/zstd_decompress_block.c +1432 -0
- data/contrib/zstd/lib/decompress/zstd_decompress_block.h +59 -0
- data/contrib/zstd/lib/decompress/zstd_decompress_internal.h +189 -0
- data/contrib/zstd/{common → lib/deprecated}/zbuff.h +86 -69
- data/contrib/zstd/lib/deprecated/zbuff_common.c +26 -0
- data/contrib/zstd/lib/deprecated/zbuff_compress.c +147 -0
- data/contrib/zstd/lib/deprecated/zbuff_decompress.c +75 -0
- data/contrib/zstd/lib/dictBuilder/cover.c +1236 -0
- data/contrib/zstd/lib/dictBuilder/cover.h +157 -0
- data/contrib/zstd/{dictBuilder → lib/dictBuilder}/divsufsort.c +3 -3
- data/contrib/zstd/{dictBuilder → lib/dictBuilder}/divsufsort.h +5 -5
- data/contrib/zstd/lib/dictBuilder/fastcover.c +757 -0
- data/contrib/zstd/{dictBuilder → lib/dictBuilder}/zdict.c +437 -347
- data/contrib/zstd/lib/dictBuilder/zdict.h +305 -0
- data/contrib/zstd/lib/legacy/zstd_legacy.h +415 -0
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v01.c +272 -292
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v01.h +26 -32
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v02.c +162 -392
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v02.h +26 -32
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v03.c +162 -391
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v03.h +27 -33
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v04.c +195 -604
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v04.h +26 -32
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v05.c +300 -575
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v05.h +22 -31
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v06.c +165 -592
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v06.h +54 -67
- data/contrib/zstd/lib/legacy/zstd_v07.c +4541 -0
- data/contrib/zstd/lib/legacy/zstd_v07.h +187 -0
- data/contrib/zstd/lib/libzstd.pc.in +15 -0
- data/contrib/zstd/lib/zstd.h +2090 -0
- data/ext/depend +2 -0
- data/ext/extconf.rb +18 -5
- data/ext/extzstd.c +296 -214
- data/ext/extzstd.h +81 -36
- data/ext/extzstd_nogvls.h +0 -117
- data/ext/extzstd_stream.c +622 -0
- data/ext/libzstd_conf.h +8 -0
- data/ext/zstd_common.c +11 -0
- data/ext/zstd_compress.c +15 -0
- data/ext/zstd_decompress.c +6 -0
- data/ext/zstd_dictbuilder.c +10 -0
- data/ext/zstd_dictbuilder_fastcover.c +3 -0
- data/ext/zstd_legacy_v01.c +3 -1
- data/ext/zstd_legacy_v02.c +3 -1
- data/ext/zstd_legacy_v03.c +3 -1
- data/ext/zstd_legacy_v04.c +3 -1
- data/ext/zstd_legacy_v05.c +3 -1
- data/ext/zstd_legacy_v06.c +3 -1
- data/ext/zstd_legacy_v07.c +3 -0
- data/gemstub.rb +27 -21
- data/lib/extzstd.rb +82 -161
- data/lib/extzstd/version.rb +1 -1
- data/test/test_basic.rb +19 -6
- metadata +127 -59
- data/contrib/zstd/common/error_private.h +0 -125
- data/contrib/zstd/common/error_public.h +0 -77
- data/contrib/zstd/common/huf.h +0 -228
- data/contrib/zstd/common/zstd.h +0 -475
- data/contrib/zstd/common/zstd_common.c +0 -91
- data/contrib/zstd/common/zstd_internal.h +0 -238
- data/contrib/zstd/compress/huf_compress.c +0 -577
- data/contrib/zstd/compress/zbuff_compress.c +0 -327
- data/contrib/zstd/compress/zstd_compress.c +0 -3074
- data/contrib/zstd/compress/zstd_opt.h +0 -1046
- data/contrib/zstd/decompress/huf_decompress.c +0 -894
- data/contrib/zstd/decompress/zbuff_decompress.c +0 -294
- data/contrib/zstd/decompress/zstd_decompress.c +0 -1362
- data/contrib/zstd/dictBuilder/zdict.h +0 -113
- data/contrib/zstd/legacy/zstd_legacy.h +0 -140
- data/ext/extzstd_buffered.c +0 -265
- data/ext/zstd_amalgam.c +0 -18
data/lib/extzstd/version.rb
CHANGED
data/test/test_basic.rb
CHANGED
|
@@ -18,24 +18,37 @@ class TestZstd < Test::Unit::TestCase
|
|
|
18
18
|
|
|
19
19
|
def test_huge
|
|
20
20
|
src = "ABCDEFGabcdefg" * 10000000
|
|
21
|
-
|
|
21
|
+
resrc = Zstd.decode(Zstd.encode(src))
|
|
22
|
+
assert_equal(src.bytesize, resrc.bytesize)
|
|
23
|
+
assert_equal(Digest::MD5.hexdigest(src), Digest::MD5.hexdigest(resrc))
|
|
22
24
|
end
|
|
23
25
|
|
|
24
26
|
def test_huge_stream
|
|
25
27
|
src = "abcdefghijklmnopqrstuvwxyz" * 1000
|
|
28
|
+
size_a = 0
|
|
26
29
|
md5a = Digest::MD5.new
|
|
27
30
|
d = StringIO.new("")
|
|
28
|
-
Zstd.encode(d) { |z| 1000.times { z << src; md5a.update src } }
|
|
31
|
+
Zstd.encode(d) { |z| 1000.times { z << src; size_a += src.bytesize; md5a.update src } }
|
|
29
32
|
d.pos = 0
|
|
33
|
+
size_b = 0
|
|
30
34
|
md5b = Digest::MD5.new
|
|
31
|
-
|
|
35
|
+
partial_list = [262144, 1, 262144, 262142, 524288, 524280, 99, 999, 9999, 99999, 999999, 9999999, nil]
|
|
36
|
+
Zstd.decode(d) do |z|
|
|
37
|
+
buf = ""
|
|
38
|
+
while z.read(s = partial_list.shift, buf)
|
|
39
|
+
assert_equal s, buf.bytesize if s
|
|
40
|
+
size_b += buf.bytesize
|
|
41
|
+
md5b.update buf
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
assert_equal size_a, size_b
|
|
32
45
|
assert_equal(md5a.hexdigest, md5b.hexdigest)
|
|
33
46
|
end
|
|
34
47
|
|
|
35
48
|
def test_dictionary
|
|
36
|
-
dictsrc = "
|
|
37
|
-
dict = Zstd.
|
|
49
|
+
dictsrc = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_-" * 5
|
|
50
|
+
dict = Zstd::Dictionary.train_from_buffer(dictsrc, 10000)
|
|
38
51
|
src = "ABCDEFGabcdefg" * 50
|
|
39
|
-
assert_equal(src, Zstd.decode(Zstd.encode(src,
|
|
52
|
+
assert_equal(src, Zstd.decode(Zstd.encode(src, dict: dict), src.bytesize, dict: dict))
|
|
40
53
|
end
|
|
41
54
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: extzstd
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- dearblue
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2020-10-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -16,105 +16,174 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0'
|
|
19
|
+
version: '12.0'
|
|
20
20
|
type: :development
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '0'
|
|
27
|
-
description: 'unoficial ruby bindings for Zstandard (zstd) <https://github.com/
|
|
26
|
+
version: '12.0'
|
|
27
|
+
description: 'unoficial ruby bindings for Zstandard (zstd) <https://github.com/facebook/zstd>.
|
|
28
28
|
|
|
29
|
-
'
|
|
30
|
-
email: dearblue@users.
|
|
29
|
+
'
|
|
30
|
+
email: dearblue@users.noreply.github.com
|
|
31
31
|
executables: []
|
|
32
32
|
extensions:
|
|
33
33
|
- ext/extconf.rb
|
|
34
34
|
extra_rdoc_files:
|
|
35
|
+
- HISTORY.ja.md
|
|
35
36
|
- LICENSE
|
|
36
37
|
- README.md
|
|
38
|
+
- contrib/zstd/CHANGELOG
|
|
37
39
|
- contrib/zstd/LICENSE
|
|
38
40
|
- contrib/zstd/README.md
|
|
41
|
+
- contrib/zstd/lib/README.md
|
|
39
42
|
- ext/extzstd.c
|
|
40
43
|
- ext/extzstd.h
|
|
41
|
-
- ext/extzstd_buffered.c
|
|
42
44
|
- ext/extzstd_nogvls.h
|
|
43
|
-
- ext/
|
|
45
|
+
- ext/extzstd_stream.c
|
|
46
|
+
- ext/libzstd_conf.h
|
|
47
|
+
- ext/zstd_common.c
|
|
48
|
+
- ext/zstd_compress.c
|
|
49
|
+
- ext/zstd_decompress.c
|
|
50
|
+
- ext/zstd_dictbuilder.c
|
|
51
|
+
- ext/zstd_dictbuilder_fastcover.c
|
|
44
52
|
- ext/zstd_legacy_v01.c
|
|
45
53
|
- ext/zstd_legacy_v02.c
|
|
46
54
|
- ext/zstd_legacy_v03.c
|
|
47
55
|
- ext/zstd_legacy_v04.c
|
|
48
56
|
- ext/zstd_legacy_v05.c
|
|
49
57
|
- ext/zstd_legacy_v06.c
|
|
58
|
+
- ext/zstd_legacy_v07.c
|
|
50
59
|
- lib/extzstd.rb
|
|
51
60
|
- lib/extzstd/version.rb
|
|
52
61
|
files:
|
|
62
|
+
- HISTORY.ja.md
|
|
53
63
|
- LICENSE
|
|
54
64
|
- README.md
|
|
55
65
|
- Rakefile
|
|
66
|
+
- contrib/zstd/CHANGELOG
|
|
67
|
+
- contrib/zstd/CODE_OF_CONDUCT.md
|
|
68
|
+
- contrib/zstd/CONTRIBUTING.md
|
|
69
|
+
- contrib/zstd/COPYING
|
|
56
70
|
- contrib/zstd/LICENSE
|
|
71
|
+
- contrib/zstd/Makefile
|
|
57
72
|
- contrib/zstd/README.md
|
|
58
|
-
- contrib/zstd/
|
|
59
|
-
- contrib/zstd/
|
|
60
|
-
- contrib/zstd/
|
|
61
|
-
- contrib/zstd/
|
|
62
|
-
- contrib/zstd/
|
|
63
|
-
- contrib/zstd/common/
|
|
64
|
-
- contrib/zstd/common/
|
|
65
|
-
- contrib/zstd/common/
|
|
66
|
-
- contrib/zstd/common/
|
|
67
|
-
- contrib/zstd/common/
|
|
68
|
-
- contrib/zstd/common/
|
|
69
|
-
- contrib/zstd/common/
|
|
70
|
-
- contrib/zstd/common/
|
|
71
|
-
- contrib/zstd/common/
|
|
72
|
-
- contrib/zstd/
|
|
73
|
-
- contrib/zstd/
|
|
74
|
-
- contrib/zstd/
|
|
75
|
-
- contrib/zstd/
|
|
76
|
-
- contrib/zstd/
|
|
77
|
-
- contrib/zstd/
|
|
78
|
-
- contrib/zstd/
|
|
79
|
-
- contrib/zstd/
|
|
80
|
-
- contrib/zstd/
|
|
81
|
-
- contrib/zstd/
|
|
82
|
-
- contrib/zstd/
|
|
83
|
-
- contrib/zstd/
|
|
84
|
-
- contrib/zstd/
|
|
85
|
-
- contrib/zstd/
|
|
86
|
-
- contrib/zstd/
|
|
87
|
-
- contrib/zstd/
|
|
88
|
-
- contrib/zstd/
|
|
89
|
-
- contrib/zstd/
|
|
90
|
-
- contrib/zstd/
|
|
91
|
-
- contrib/zstd/
|
|
92
|
-
- contrib/zstd/
|
|
93
|
-
- contrib/zstd/
|
|
94
|
-
- contrib/zstd/
|
|
95
|
-
- contrib/zstd/
|
|
96
|
-
- contrib/zstd/
|
|
73
|
+
- contrib/zstd/TESTING.md
|
|
74
|
+
- contrib/zstd/appveyor.yml
|
|
75
|
+
- contrib/zstd/lib/BUCK
|
|
76
|
+
- contrib/zstd/lib/Makefile
|
|
77
|
+
- contrib/zstd/lib/README.md
|
|
78
|
+
- contrib/zstd/lib/common/bitstream.h
|
|
79
|
+
- contrib/zstd/lib/common/compiler.h
|
|
80
|
+
- contrib/zstd/lib/common/cpu.h
|
|
81
|
+
- contrib/zstd/lib/common/debug.c
|
|
82
|
+
- contrib/zstd/lib/common/debug.h
|
|
83
|
+
- contrib/zstd/lib/common/entropy_common.c
|
|
84
|
+
- contrib/zstd/lib/common/error_private.c
|
|
85
|
+
- contrib/zstd/lib/common/error_private.h
|
|
86
|
+
- contrib/zstd/lib/common/fse.h
|
|
87
|
+
- contrib/zstd/lib/common/fse_decompress.c
|
|
88
|
+
- contrib/zstd/lib/common/huf.h
|
|
89
|
+
- contrib/zstd/lib/common/mem.h
|
|
90
|
+
- contrib/zstd/lib/common/pool.c
|
|
91
|
+
- contrib/zstd/lib/common/pool.h
|
|
92
|
+
- contrib/zstd/lib/common/threading.c
|
|
93
|
+
- contrib/zstd/lib/common/threading.h
|
|
94
|
+
- contrib/zstd/lib/common/xxhash.c
|
|
95
|
+
- contrib/zstd/lib/common/xxhash.h
|
|
96
|
+
- contrib/zstd/lib/common/zstd_common.c
|
|
97
|
+
- contrib/zstd/lib/common/zstd_errors.h
|
|
98
|
+
- contrib/zstd/lib/common/zstd_internal.h
|
|
99
|
+
- contrib/zstd/lib/compress/fse_compress.c
|
|
100
|
+
- contrib/zstd/lib/compress/hist.c
|
|
101
|
+
- contrib/zstd/lib/compress/hist.h
|
|
102
|
+
- contrib/zstd/lib/compress/huf_compress.c
|
|
103
|
+
- contrib/zstd/lib/compress/zstd_compress.c
|
|
104
|
+
- contrib/zstd/lib/compress/zstd_compress_internal.h
|
|
105
|
+
- contrib/zstd/lib/compress/zstd_compress_literals.c
|
|
106
|
+
- contrib/zstd/lib/compress/zstd_compress_literals.h
|
|
107
|
+
- contrib/zstd/lib/compress/zstd_compress_sequences.c
|
|
108
|
+
- contrib/zstd/lib/compress/zstd_compress_sequences.h
|
|
109
|
+
- contrib/zstd/lib/compress/zstd_compress_superblock.c
|
|
110
|
+
- contrib/zstd/lib/compress/zstd_compress_superblock.h
|
|
111
|
+
- contrib/zstd/lib/compress/zstd_cwksp.h
|
|
112
|
+
- contrib/zstd/lib/compress/zstd_double_fast.c
|
|
113
|
+
- contrib/zstd/lib/compress/zstd_double_fast.h
|
|
114
|
+
- contrib/zstd/lib/compress/zstd_fast.c
|
|
115
|
+
- contrib/zstd/lib/compress/zstd_fast.h
|
|
116
|
+
- contrib/zstd/lib/compress/zstd_lazy.c
|
|
117
|
+
- contrib/zstd/lib/compress/zstd_lazy.h
|
|
118
|
+
- contrib/zstd/lib/compress/zstd_ldm.c
|
|
119
|
+
- contrib/zstd/lib/compress/zstd_ldm.h
|
|
120
|
+
- contrib/zstd/lib/compress/zstd_opt.c
|
|
121
|
+
- contrib/zstd/lib/compress/zstd_opt.h
|
|
122
|
+
- contrib/zstd/lib/compress/zstdmt_compress.c
|
|
123
|
+
- contrib/zstd/lib/compress/zstdmt_compress.h
|
|
124
|
+
- contrib/zstd/lib/decompress/huf_decompress.c
|
|
125
|
+
- contrib/zstd/lib/decompress/zstd_ddict.c
|
|
126
|
+
- contrib/zstd/lib/decompress/zstd_ddict.h
|
|
127
|
+
- contrib/zstd/lib/decompress/zstd_decompress.c
|
|
128
|
+
- contrib/zstd/lib/decompress/zstd_decompress_block.c
|
|
129
|
+
- contrib/zstd/lib/decompress/zstd_decompress_block.h
|
|
130
|
+
- contrib/zstd/lib/decompress/zstd_decompress_internal.h
|
|
131
|
+
- contrib/zstd/lib/deprecated/zbuff.h
|
|
132
|
+
- contrib/zstd/lib/deprecated/zbuff_common.c
|
|
133
|
+
- contrib/zstd/lib/deprecated/zbuff_compress.c
|
|
134
|
+
- contrib/zstd/lib/deprecated/zbuff_decompress.c
|
|
135
|
+
- contrib/zstd/lib/dictBuilder/cover.c
|
|
136
|
+
- contrib/zstd/lib/dictBuilder/cover.h
|
|
137
|
+
- contrib/zstd/lib/dictBuilder/divsufsort.c
|
|
138
|
+
- contrib/zstd/lib/dictBuilder/divsufsort.h
|
|
139
|
+
- contrib/zstd/lib/dictBuilder/fastcover.c
|
|
140
|
+
- contrib/zstd/lib/dictBuilder/zdict.c
|
|
141
|
+
- contrib/zstd/lib/dictBuilder/zdict.h
|
|
142
|
+
- contrib/zstd/lib/legacy/zstd_legacy.h
|
|
143
|
+
- contrib/zstd/lib/legacy/zstd_v01.c
|
|
144
|
+
- contrib/zstd/lib/legacy/zstd_v01.h
|
|
145
|
+
- contrib/zstd/lib/legacy/zstd_v02.c
|
|
146
|
+
- contrib/zstd/lib/legacy/zstd_v02.h
|
|
147
|
+
- contrib/zstd/lib/legacy/zstd_v03.c
|
|
148
|
+
- contrib/zstd/lib/legacy/zstd_v03.h
|
|
149
|
+
- contrib/zstd/lib/legacy/zstd_v04.c
|
|
150
|
+
- contrib/zstd/lib/legacy/zstd_v04.h
|
|
151
|
+
- contrib/zstd/lib/legacy/zstd_v05.c
|
|
152
|
+
- contrib/zstd/lib/legacy/zstd_v05.h
|
|
153
|
+
- contrib/zstd/lib/legacy/zstd_v06.c
|
|
154
|
+
- contrib/zstd/lib/legacy/zstd_v06.h
|
|
155
|
+
- contrib/zstd/lib/legacy/zstd_v07.c
|
|
156
|
+
- contrib/zstd/lib/legacy/zstd_v07.h
|
|
157
|
+
- contrib/zstd/lib/libzstd.pc.in
|
|
158
|
+
- contrib/zstd/lib/zstd.h
|
|
159
|
+
- ext/depend
|
|
97
160
|
- ext/extconf.rb
|
|
98
161
|
- ext/extzstd.c
|
|
99
162
|
- ext/extzstd.h
|
|
100
|
-
- ext/extzstd_buffered.c
|
|
101
163
|
- ext/extzstd_nogvls.h
|
|
102
|
-
- ext/
|
|
164
|
+
- ext/extzstd_stream.c
|
|
165
|
+
- ext/libzstd_conf.h
|
|
166
|
+
- ext/zstd_common.c
|
|
167
|
+
- ext/zstd_compress.c
|
|
168
|
+
- ext/zstd_decompress.c
|
|
169
|
+
- ext/zstd_dictbuilder.c
|
|
170
|
+
- ext/zstd_dictbuilder_fastcover.c
|
|
103
171
|
- ext/zstd_legacy_v01.c
|
|
104
172
|
- ext/zstd_legacy_v02.c
|
|
105
173
|
- ext/zstd_legacy_v03.c
|
|
106
174
|
- ext/zstd_legacy_v04.c
|
|
107
175
|
- ext/zstd_legacy_v05.c
|
|
108
176
|
- ext/zstd_legacy_v06.c
|
|
177
|
+
- ext/zstd_legacy_v07.c
|
|
109
178
|
- gemstub.rb
|
|
110
179
|
- lib/extzstd.rb
|
|
111
180
|
- lib/extzstd/version.rb
|
|
112
181
|
- test/test_basic.rb
|
|
113
|
-
homepage: https://
|
|
182
|
+
homepage: https://github.com/dearblue/ruby-extzstd/
|
|
114
183
|
licenses:
|
|
115
|
-
- 2-
|
|
184
|
+
- BSD-2-Clause
|
|
116
185
|
metadata: {}
|
|
117
|
-
post_install_message:
|
|
186
|
+
post_install_message:
|
|
118
187
|
rdoc_options:
|
|
119
188
|
- "--charset"
|
|
120
189
|
- UTF-8
|
|
@@ -129,13 +198,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
129
198
|
version: '2.0'
|
|
130
199
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
200
|
requirements:
|
|
132
|
-
- - "
|
|
201
|
+
- - ">="
|
|
133
202
|
- !ruby/object:Gem::Version
|
|
134
|
-
version:
|
|
203
|
+
version: '0'
|
|
135
204
|
requirements: []
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
signing_key:
|
|
205
|
+
rubygems_version: 3.0.6
|
|
206
|
+
signing_key:
|
|
139
207
|
specification_version: 4
|
|
140
208
|
summary: ruby bindings for Zstandard (zstd)
|
|
141
209
|
test_files: []
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
/* ******************************************************************
|
|
2
|
-
Error codes and messages
|
|
3
|
-
Copyright (C) 2013-2016, Yann Collet
|
|
4
|
-
|
|
5
|
-
BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
|
|
6
|
-
|
|
7
|
-
Redistribution and use in source and binary forms, with or without
|
|
8
|
-
modification, are permitted provided that the following conditions are
|
|
9
|
-
met:
|
|
10
|
-
|
|
11
|
-
* Redistributions of source code must retain the above copyright
|
|
12
|
-
notice, this list of conditions and the following disclaimer.
|
|
13
|
-
* Redistributions in binary form must reproduce the above
|
|
14
|
-
copyright notice, this list of conditions and the following disclaimer
|
|
15
|
-
in the documentation and/or other materials provided with the
|
|
16
|
-
distribution.
|
|
17
|
-
|
|
18
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
19
|
-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
20
|
-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
21
|
-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
22
|
-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
23
|
-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
24
|
-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
25
|
-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
26
|
-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
27
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
29
|
-
|
|
30
|
-
You can contact the author at :
|
|
31
|
-
- Homepage : http://www.zstd.net
|
|
32
|
-
****************************************************************** */
|
|
33
|
-
/* Note : this module is expected to remain private, do not expose it */
|
|
34
|
-
|
|
35
|
-
#ifndef ERROR_H_MODULE
|
|
36
|
-
#define ERROR_H_MODULE
|
|
37
|
-
|
|
38
|
-
#if defined (__cplusplus)
|
|
39
|
-
extern "C" {
|
|
40
|
-
#endif
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
/* ****************************************
|
|
44
|
-
* Dependencies
|
|
45
|
-
******************************************/
|
|
46
|
-
#include <stddef.h> /* size_t */
|
|
47
|
-
#include "error_public.h" /* enum list */
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
/* ****************************************
|
|
51
|
-
* Compiler-specific
|
|
52
|
-
******************************************/
|
|
53
|
-
#if defined(__GNUC__)
|
|
54
|
-
# define ERR_STATIC static __attribute__((unused))
|
|
55
|
-
#elif defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */)
|
|
56
|
-
# define ERR_STATIC static inline
|
|
57
|
-
#elif defined(_MSC_VER)
|
|
58
|
-
# define ERR_STATIC static __inline
|
|
59
|
-
#else
|
|
60
|
-
# define ERR_STATIC static /* this version may generate warnings for unused static functions; disable the relevant warning */
|
|
61
|
-
#endif
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
/*-****************************************
|
|
65
|
-
* Customization (error_public.h)
|
|
66
|
-
******************************************/
|
|
67
|
-
typedef ZSTD_ErrorCode ERR_enum;
|
|
68
|
-
#define PREFIX(name) ZSTD_error_##name
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
/*-****************************************
|
|
72
|
-
* Error codes handling
|
|
73
|
-
******************************************/
|
|
74
|
-
#ifdef ERROR
|
|
75
|
-
# undef ERROR /* reported already defined on VS 2015 (Rich Geldreich) */
|
|
76
|
-
#endif
|
|
77
|
-
#define ERROR(name) ((size_t)-PREFIX(name))
|
|
78
|
-
|
|
79
|
-
ERR_STATIC unsigned ERR_isError(size_t code) { return (code > ERROR(maxCode)); }
|
|
80
|
-
|
|
81
|
-
ERR_STATIC ERR_enum ERR_getErrorCode(size_t code) { if (!ERR_isError(code)) return (ERR_enum)0; return (ERR_enum) (0-code); }
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
/*-****************************************
|
|
85
|
-
* Error Strings
|
|
86
|
-
******************************************/
|
|
87
|
-
|
|
88
|
-
ERR_STATIC const char* ERR_getErrorString(ERR_enum code)
|
|
89
|
-
{
|
|
90
|
-
static const char* notErrorCode = "Unspecified error code";
|
|
91
|
-
switch( code )
|
|
92
|
-
{
|
|
93
|
-
case PREFIX(no_error): return "No error detected";
|
|
94
|
-
case PREFIX(GENERIC): return "Error (generic)";
|
|
95
|
-
case PREFIX(prefix_unknown): return "Unknown frame descriptor";
|
|
96
|
-
case PREFIX(frameParameter_unsupported): return "Unsupported frame parameter";
|
|
97
|
-
case PREFIX(frameParameter_unsupportedBy32bits): return "Frame parameter unsupported in 32-bits mode";
|
|
98
|
-
case PREFIX(compressionParameter_unsupported): return "Compression parameter is out of bound";
|
|
99
|
-
case PREFIX(init_missing): return "Context should be init first";
|
|
100
|
-
case PREFIX(memory_allocation): return "Allocation error : not enough memory";
|
|
101
|
-
case PREFIX(stage_wrong): return "Operation not authorized at current processing stage";
|
|
102
|
-
case PREFIX(dstSize_tooSmall): return "Destination buffer is too small";
|
|
103
|
-
case PREFIX(srcSize_wrong): return "Src size incorrect";
|
|
104
|
-
case PREFIX(corruption_detected): return "Corrupted block detected";
|
|
105
|
-
case PREFIX(checksum_wrong): return "Restored data doesn't match checksum";
|
|
106
|
-
case PREFIX(tableLog_tooLarge): return "tableLog requires too much memory : unsupported";
|
|
107
|
-
case PREFIX(maxSymbolValue_tooLarge): return "Unsupported max Symbol Value : too large";
|
|
108
|
-
case PREFIX(maxSymbolValue_tooSmall): return "Specified maxSymbolValue is too small";
|
|
109
|
-
case PREFIX(dictionary_corrupted): return "Dictionary is corrupted";
|
|
110
|
-
case PREFIX(dictionary_wrong): return "Dictionary mismatch";
|
|
111
|
-
case PREFIX(maxCode):
|
|
112
|
-
default: return notErrorCode;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
ERR_STATIC const char* ERR_getErrorName(size_t code)
|
|
117
|
-
{
|
|
118
|
-
return ERR_getErrorString(ERR_getErrorCode(code));
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
#if defined (__cplusplus)
|
|
122
|
-
}
|
|
123
|
-
#endif
|
|
124
|
-
|
|
125
|
-
#endif /* ERROR_H_MODULE */
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/* ******************************************************************
|
|
2
|
-
Error codes list
|
|
3
|
-
Copyright (C) 2016, Yann Collet
|
|
4
|
-
|
|
5
|
-
BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
|
|
6
|
-
|
|
7
|
-
Redistribution and use in source and binary forms, with or without
|
|
8
|
-
modification, are permitted provided that the following conditions are
|
|
9
|
-
met:
|
|
10
|
-
|
|
11
|
-
* Redistributions of source code must retain the above copyright
|
|
12
|
-
notice, this list of conditions and the following disclaimer.
|
|
13
|
-
* Redistributions in binary form must reproduce the above
|
|
14
|
-
copyright notice, this list of conditions and the following disclaimer
|
|
15
|
-
in the documentation and/or other materials provided with the
|
|
16
|
-
distribution.
|
|
17
|
-
|
|
18
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
19
|
-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
20
|
-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
21
|
-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
22
|
-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
23
|
-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
24
|
-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
25
|
-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
26
|
-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
27
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
29
|
-
|
|
30
|
-
You can contact the author at :
|
|
31
|
-
- Homepage : http://www.zstd.net
|
|
32
|
-
****************************************************************** */
|
|
33
|
-
#ifndef ERROR_PUBLIC_H_MODULE
|
|
34
|
-
#define ERROR_PUBLIC_H_MODULE
|
|
35
|
-
|
|
36
|
-
#if defined (__cplusplus)
|
|
37
|
-
extern "C" {
|
|
38
|
-
#endif
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
/* ****************************************
|
|
42
|
-
* error codes list
|
|
43
|
-
******************************************/
|
|
44
|
-
typedef enum {
|
|
45
|
-
ZSTD_error_no_error,
|
|
46
|
-
ZSTD_error_GENERIC,
|
|
47
|
-
ZSTD_error_prefix_unknown,
|
|
48
|
-
ZSTD_error_frameParameter_unsupported,
|
|
49
|
-
ZSTD_error_frameParameter_unsupportedBy32bits,
|
|
50
|
-
ZSTD_error_compressionParameter_unsupported,
|
|
51
|
-
ZSTD_error_init_missing,
|
|
52
|
-
ZSTD_error_memory_allocation,
|
|
53
|
-
ZSTD_error_stage_wrong,
|
|
54
|
-
ZSTD_error_dstSize_tooSmall,
|
|
55
|
-
ZSTD_error_srcSize_wrong,
|
|
56
|
-
ZSTD_error_corruption_detected,
|
|
57
|
-
ZSTD_error_checksum_wrong,
|
|
58
|
-
ZSTD_error_tableLog_tooLarge,
|
|
59
|
-
ZSTD_error_maxSymbolValue_tooLarge,
|
|
60
|
-
ZSTD_error_maxSymbolValue_tooSmall,
|
|
61
|
-
ZSTD_error_dictionary_corrupted,
|
|
62
|
-
ZSTD_error_dictionary_wrong,
|
|
63
|
-
ZSTD_error_maxCode
|
|
64
|
-
} ZSTD_ErrorCode;
|
|
65
|
-
|
|
66
|
-
/*! ZSTD_getErrorCode() :
|
|
67
|
-
convert a `size_t` function result into a `ZSTD_ErrorCode` enum type,
|
|
68
|
-
which can be used to compare directly with enum list published into "error_public.h" */
|
|
69
|
-
ZSTD_ErrorCode ZSTD_getErrorCode(size_t functionResult);
|
|
70
|
-
const char* ZSTD_getErrorString(ZSTD_ErrorCode code);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
#if defined (__cplusplus)
|
|
74
|
-
}
|
|
75
|
-
#endif
|
|
76
|
-
|
|
77
|
-
#endif /* ERROR_PUBLIC_H_MODULE */
|