zstd-ruby 1.3.1.0 → 1.3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -5
- data/ext/zstdruby/zstdruby.c +2 -3
- data/lib/zstd-ruby/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94a56402c61bd26301a2e7b7283641f5f20a1ef8
|
4
|
+
data.tar.gz: 2f677687590b21d6d7eaac5e32821e61329e8394
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26e898a1075a13c3f20f9b9bc80cf6475d40697096a99f5aab46266a4ecc8079982634603fb4d99c999fd5436e642554ac043f7973f4023505e5387c255cb7f8
|
7
|
+
data.tar.gz: 61bcdcf4ef08f8fa54b5962abac10db0ffaee0170b80ca7546d4751baf9e1dd7f259a27c5607cda774d412f0eaa0a3d99bbc657cc64291eac499b732f06707d3
|
data/README.md
CHANGED
@@ -29,21 +29,22 @@ Or install it yourself as:
|
|
29
29
|
|
30
30
|
## Usage
|
31
31
|
|
32
|
-
```
|
32
|
+
```ruby
|
33
33
|
require 'zstd-ruby'
|
34
34
|
```
|
35
35
|
|
36
36
|
### compression
|
37
37
|
|
38
|
-
```
|
39
|
-
Zstd.compress(data)
|
38
|
+
```ruby
|
39
|
+
compressed_data = Zstd.compress(data)
|
40
|
+
compressed_data = Zstd.compress(data, complession_level) # default compression_level is 0
|
40
41
|
```
|
41
42
|
|
42
43
|
|
43
44
|
### decompression
|
44
45
|
|
45
|
-
```
|
46
|
-
Zstd.decompress(compressed_data)
|
46
|
+
```ruby
|
47
|
+
data = Zstd.decompress(compressed_data)
|
47
48
|
```
|
48
49
|
|
49
50
|
## Development
|
data/ext/zstdruby/zstdruby.c
CHANGED
@@ -19,10 +19,9 @@ static VALUE compress(int argc, VALUE *argv, VALUE self)
|
|
19
19
|
|
20
20
|
int compression_level;
|
21
21
|
if (NIL_P(compression_level_value)) {
|
22
|
-
compression_level =
|
22
|
+
compression_level = 0; // The default. See ZSTD_CLEVEL_DEFAULT in zstd_compress.c
|
23
23
|
} else {
|
24
|
-
|
25
|
-
compression_level = FIX2INT(compression_level_value);
|
24
|
+
compression_level = NUM2INT(compression_level_value);
|
26
25
|
}
|
27
26
|
|
28
27
|
// do compress
|
data/lib/zstd-ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zstd-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.1.
|
4
|
+
version: 1.3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SpringMT
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|