lz4-ruby 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/ext/lz4ruby.c +1 -3
- data/lz4-ruby.gemspec +2 -2
- data/test/helper.rb +1 -0
- data/test/test_lz4-ruby.rb +11 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/ext/lz4ruby.c
CHANGED
@@ -59,7 +59,7 @@ static VALUE lz4_ruby_uncompress(VALUE self, VALUE source) {
|
|
59
59
|
| ((src_p[2] & 0xffU) << 8)
|
60
60
|
| (src_p[3] & 0xffU);
|
61
61
|
|
62
|
-
result = rb_str_new(NULL, buf_size
|
62
|
+
result = rb_str_new(NULL, buf_size);
|
63
63
|
buf = RSTRING_PTR(result);
|
64
64
|
|
65
65
|
read_bytes = LZ4_uncompress(src_p + 4, buf, buf_size);
|
@@ -67,8 +67,6 @@ static VALUE lz4_ruby_uncompress(VALUE self, VALUE source) {
|
|
67
67
|
rb_raise(lz4_error, "Compressed data is maybe corrupted.");
|
68
68
|
}
|
69
69
|
|
70
|
-
buf[buf_size] = '\0';
|
71
|
-
|
72
70
|
return result;
|
73
71
|
}
|
74
72
|
|
data/lz4-ruby.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "lz4-ruby"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["KOMIYA Atsushi"]
|
12
|
-
s.date = "2012-06-
|
12
|
+
s.date = "2012-06-04"
|
13
13
|
s.description = "Ruby bindings for LZ4."
|
14
14
|
s.email = "komiya.atsushi@gmail.com"
|
15
15
|
s.extensions = ["ext/extconf.rb"]
|
data/test/helper.rb
CHANGED
data/test/test_lz4-ruby.rb
CHANGED
@@ -1,7 +1,16 @@
|
|
1
1
|
require 'helper'
|
2
2
|
|
3
3
|
class TestLz4Ruby < Test::Unit::TestCase
|
4
|
-
|
5
|
-
|
4
|
+
context "LZ4::compress" do
|
5
|
+
257.times do |t|
|
6
|
+
len = t + 1
|
7
|
+
text = "a" * len
|
8
|
+
|
9
|
+
should "text of #{len} \"a\"'s" do
|
10
|
+
compressed = LZ4::compress(text)
|
11
|
+
uncompressed = LZ4::uncompress(compressed)
|
12
|
+
assert_equal(text, uncompressed)
|
13
|
+
end
|
14
|
+
end
|
6
15
|
end
|
7
16
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lz4-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06-
|
12
|
+
date: 2012-06-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: shoulda
|
@@ -116,7 +116,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
116
116
|
version: '0'
|
117
117
|
segments:
|
118
118
|
- 0
|
119
|
-
hash:
|
119
|
+
hash: 492549213
|
120
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
121
|
none: false
|
122
122
|
requirements:
|