tinybits 0.6.0 → 0.7.0
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 +4 -4
- data/ext/tinybits/tinybits.h +3 -2
- data/ext/tinybits/tinybits_ext.c +3 -3
- data/lib/tinybits/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b85036300ef1fdcc8e58f52bbdcbb97608de1e114b8a60e219d6a4c7916e03dd
|
|
4
|
+
data.tar.gz: b3cfb9ec09f09c2df38c0cfb984f5e43e22a3324b18b27e534374180d8f14bcf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c087b9799699c49e67f84bf3677511778691b951773279c6153b20f8f4c92de3ff0b34cfd2e07e4f62e8f85098dcb2135e433a15be5e544f254f5304ba4a8634
|
|
7
|
+
data.tar.gz: cf6abb1686f1cbd6eb5cd6bfb03a5ef808fec12200c2ed699f93298a7339a94baaefdc0bf31427e731089e8e48bef359988f55f3cc2ccfc2379fcdbdb1683754
|
data/ext/tinybits/tinybits.h
CHANGED
|
@@ -1129,9 +1129,10 @@ static inline enum tiny_bits_type _unpack_str(tiny_bits_unpacker *decoder, uint8
|
|
|
1129
1129
|
if(read == 0) return TINY_BITS_ERROR;
|
|
1130
1130
|
len += 31;
|
|
1131
1131
|
if(pos + read + len > decoder->size) return TINY_BITS_ERROR;
|
|
1132
|
-
value->str_blob_val.data = (const char *)decoder->buffer + pos;
|
|
1133
|
-
value->str_blob_val.length = len;
|
|
1134
1132
|
decoder->current_pos += (read + len);
|
|
1133
|
+
pos += read;
|
|
1134
|
+
value->str_blob_val.data = (const char *)decoder->buffer + pos;
|
|
1135
|
+
value->str_blob_val.length = len;
|
|
1135
1136
|
} else { // Deduplicated (small: < 0x7F, large: 0x7F)
|
|
1136
1137
|
size_t id;
|
|
1137
1138
|
size_t read;
|
data/ext/tinybits/tinybits_ext.c
CHANGED
|
@@ -503,7 +503,7 @@ static VALUE rb_pop(VALUE self) {
|
|
|
503
503
|
|
|
504
504
|
tiny_bits_unpacker* unpacker = unpacker_data->unpacker;
|
|
505
505
|
|
|
506
|
-
if(unpacker->current_pos >= unpacker->size
|
|
506
|
+
if(unpacker->current_pos >= unpacker->size){
|
|
507
507
|
rb_ary_clear(array);
|
|
508
508
|
return Qnil;
|
|
509
509
|
}
|
|
@@ -513,7 +513,7 @@ static VALUE rb_pop(VALUE self) {
|
|
|
513
513
|
rb_raise(rb_eRuntimeError, "Failed to unpack data");
|
|
514
514
|
}
|
|
515
515
|
|
|
516
|
-
if(unpacker->current_pos >=
|
|
516
|
+
if(unpacker->current_pos >= unpacker->size){
|
|
517
517
|
rb_ary_clear(array);
|
|
518
518
|
}
|
|
519
519
|
|
|
@@ -543,7 +543,7 @@ static VALUE rb_finished(VALUE self){
|
|
|
543
543
|
|
|
544
544
|
tiny_bits_unpacker* unpacker = unpacker_data->unpacker;
|
|
545
545
|
|
|
546
|
-
if(unpacker->current_pos >=
|
|
546
|
+
if(unpacker->current_pos >= unpacker->size){
|
|
547
547
|
return Qtrue;
|
|
548
548
|
}
|
|
549
549
|
|
data/lib/tinybits/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tinybits
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mohamed Hassan
|
|
@@ -44,7 +44,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
44
44
|
- !ruby/object:Gem::Version
|
|
45
45
|
version: '0'
|
|
46
46
|
requirements: []
|
|
47
|
-
rubygems_version:
|
|
47
|
+
rubygems_version: 4.0.11
|
|
48
48
|
specification_version: 4
|
|
49
49
|
summary: Very fast and compact serialization for Ruby!
|
|
50
50
|
test_files: []
|