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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 48af64c3a8015d954ae016873a99cb5988e07b51
4
- data.tar.gz: 34992d313542ff44254b5d234b2cea8c80564676
3
+ metadata.gz: 94a56402c61bd26301a2e7b7283641f5f20a1ef8
4
+ data.tar.gz: 2f677687590b21d6d7eaac5e32821e61329e8394
5
5
  SHA512:
6
- metadata.gz: e80edaa544a84fa28ce973e19e96ecb79340f1d6e85e5618106d421200c5d6404762a0d84eb8645f42b9d1595726f8290b9f74293906ea759961dfc6dfaae3d3
7
- data.tar.gz: 181ccfef8a7342066ce1c41232014d0879dc90d2b8f65c6b648ded882a3eb268fab005270eece025a18ccc5d97edc81e4a5cebec9500396428c6af766372925d
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
@@ -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 = 1;
22
+ compression_level = 0; // The default. See ZSTD_CLEVEL_DEFAULT in zstd_compress.c
23
23
  } else {
24
- Check_Type(compression_level_value, RUBY_T_FIXNUM);
25
- compression_level = FIX2INT(compression_level_value);
24
+ compression_level = NUM2INT(compression_level_value);
26
25
  }
27
26
 
28
27
  // do compress
@@ -1,3 +1,3 @@
1
1
  module Zstd
2
- VERSION = "1.3.1.0"
2
+ VERSION = "1.3.1.1"
3
3
  end
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.0
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-08-23 00:00:00.000000000 Z
11
+ date: 2017-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler