msgpack 1.4.2 → 1.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +89 -0
- data/README.md +73 -13
- data/ext/java/org/msgpack/jruby/Buffer.java +26 -19
- data/ext/java/org/msgpack/jruby/Decoder.java +29 -21
- data/ext/java/org/msgpack/jruby/Encoder.java +68 -30
- data/ext/java/org/msgpack/jruby/ExtensionRegistry.java +43 -64
- data/ext/java/org/msgpack/jruby/ExtensionValue.java +6 -9
- data/ext/java/org/msgpack/jruby/Factory.java +43 -42
- data/ext/java/org/msgpack/jruby/Packer.java +37 -40
- data/ext/java/org/msgpack/jruby/Unpacker.java +80 -73
- data/ext/msgpack/buffer.c +54 -74
- data/ext/msgpack/buffer.h +21 -18
- data/ext/msgpack/buffer_class.c +161 -52
- data/ext/msgpack/buffer_class.h +1 -0
- data/ext/msgpack/compat.h +0 -99
- data/ext/msgpack/extconf.rb +25 -46
- data/ext/msgpack/factory_class.c +143 -87
- data/ext/msgpack/packer.c +66 -43
- data/ext/msgpack/packer.h +25 -20
- data/ext/msgpack/packer_class.c +102 -130
- data/ext/msgpack/packer_class.h +11 -0
- data/ext/msgpack/packer_ext_registry.c +35 -40
- data/ext/msgpack/packer_ext_registry.h +41 -38
- data/ext/msgpack/rbinit.c +1 -1
- data/ext/msgpack/rmem.c +3 -4
- data/ext/msgpack/sysdep.h +5 -2
- data/ext/msgpack/unpacker.c +136 -111
- data/ext/msgpack/unpacker.h +16 -13
- data/ext/msgpack/unpacker_class.c +86 -126
- data/ext/msgpack/unpacker_class.h +11 -0
- data/ext/msgpack/unpacker_ext_registry.c +40 -28
- data/ext/msgpack/unpacker_ext_registry.h +21 -18
- data/lib/msgpack/bigint.rb +69 -0
- data/lib/msgpack/buffer.rb +9 -0
- data/lib/msgpack/factory.rb +140 -10
- data/lib/msgpack/packer.rb +10 -1
- data/lib/msgpack/symbol.rb +21 -4
- data/lib/msgpack/time.rb +1 -1
- data/lib/msgpack/unpacker.rb +14 -1
- data/lib/msgpack/version.rb +1 -1
- data/lib/msgpack.rb +6 -7
- data/msgpack.gemspec +8 -5
- metadata +37 -82
- data/.gitignore +0 -23
- data/.rubocop.yml +0 -36
- data/.travis.yml +0 -39
- data/Gemfile +0 -9
- data/Rakefile +0 -71
- data/appveyor.yml +0 -18
- data/bench/pack.rb +0 -23
- data/bench/pack_log.rb +0 -33
- data/bench/pack_log_long.rb +0 -65
- data/bench/pack_symbols.rb +0 -28
- data/bench/run.sh +0 -14
- data/bench/run_long.sh +0 -35
- data/bench/run_symbols.sh +0 -26
- data/bench/unpack.rb +0 -21
- data/bench/unpack_log.rb +0 -34
- data/bench/unpack_log_long.rb +0 -67
- data/doclib/msgpack/buffer.rb +0 -193
- data/doclib/msgpack/core_ext.rb +0 -101
- data/doclib/msgpack/error.rb +0 -19
- data/doclib/msgpack/extension_value.rb +0 -9
- data/doclib/msgpack/factory.rb +0 -101
- data/doclib/msgpack/packer.rb +0 -208
- data/doclib/msgpack/time.rb +0 -22
- data/doclib/msgpack/timestamp.rb +0 -44
- data/doclib/msgpack/unpacker.rb +0 -183
- data/doclib/msgpack.rb +0 -87
- data/msgpack.org.md +0 -46
- data/spec/cases.json +0 -1
- data/spec/cases.msg +0 -0
- data/spec/cases_compact.msg +0 -0
- data/spec/cases_spec.rb +0 -39
- data/spec/cruby/buffer_io_spec.rb +0 -255
- data/spec/cruby/buffer_packer.rb +0 -29
- data/spec/cruby/buffer_spec.rb +0 -575
- data/spec/cruby/buffer_unpacker.rb +0 -19
- data/spec/cruby/unpacker_spec.rb +0 -70
- data/spec/ext_value_spec.rb +0 -99
- data/spec/exttypes.rb +0 -51
- data/spec/factory_spec.rb +0 -367
- data/spec/format_spec.rb +0 -301
- data/spec/jruby/benchmarks/shootout_bm.rb +0 -73
- data/spec/jruby/benchmarks/symbolize_keys_bm.rb +0 -25
- data/spec/jruby/unpacker_spec.rb +0 -186
- data/spec/msgpack_spec.rb +0 -214
- data/spec/pack_spec.rb +0 -61
- data/spec/packer_spec.rb +0 -557
- data/spec/random_compat.rb +0 -24
- data/spec/spec_helper.rb +0 -55
- data/spec/timestamp_spec.rb +0 -121
- data/spec/unpack_spec.rb +0 -57
- data/spec/unpacker_spec.rb +0 -819
data/lib/msgpack/factory.rb
CHANGED
@@ -2,11 +2,46 @@ module MessagePack
|
|
2
2
|
class Factory
|
3
3
|
# see ext for other methods
|
4
4
|
|
5
|
+
def register_type(type, klass, options = { packer: :to_msgpack_ext, unpacker: :from_msgpack_ext })
|
6
|
+
raise FrozenError, "can't modify frozen MessagePack::Factory" if frozen?
|
7
|
+
|
8
|
+
if options
|
9
|
+
options = options.dup
|
10
|
+
case packer = options[:packer]
|
11
|
+
when nil, Proc
|
12
|
+
# all good
|
13
|
+
when String, Symbol
|
14
|
+
options[:packer] = packer.to_sym.to_proc
|
15
|
+
when Method
|
16
|
+
options[:packer] = packer.to_proc
|
17
|
+
when packer.respond_to?(:call)
|
18
|
+
options[:packer] = packer.method(:call).to_proc
|
19
|
+
else
|
20
|
+
raise ::TypeError, "expected :packer argument to be a callable object, got: #{packer.inspect}"
|
21
|
+
end
|
22
|
+
|
23
|
+
case unpacker = options[:unpacker]
|
24
|
+
when nil, Proc
|
25
|
+
# all good
|
26
|
+
when String, Symbol
|
27
|
+
options[:unpacker] = klass.method(unpacker).to_proc
|
28
|
+
when Method
|
29
|
+
options[:unpacker] = unpacker.to_proc
|
30
|
+
when packer.respond_to?(:call)
|
31
|
+
options[:unpacker] = unpacker.method(:call).to_proc
|
32
|
+
else
|
33
|
+
raise ::TypeError, "expected :unpacker argument to be a callable object, got: #{unpacker.inspect}"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
register_type_internal(type, klass, options)
|
38
|
+
end
|
39
|
+
|
5
40
|
# [ {type: id, class: Class(or nil), packer: arg, unpacker: arg}, ... ]
|
6
41
|
def registered_types(selector=:both)
|
7
42
|
packer, unpacker = registered_types_internal
|
8
|
-
# packer: Class -> [tid, proc,
|
9
|
-
# unpacker: tid -> [klass, proc,
|
43
|
+
# packer: Class -> [tid, proc, _flags]
|
44
|
+
# unpacker: tid -> [klass, proc, _flags]
|
10
45
|
|
11
46
|
list = []
|
12
47
|
|
@@ -14,27 +49,31 @@ module MessagePack
|
|
14
49
|
when :both
|
15
50
|
packer.each_pair do |klass, ary|
|
16
51
|
type = ary[0]
|
17
|
-
|
18
|
-
|
19
|
-
if unpacker.has_key?(type)
|
20
|
-
|
52
|
+
packer_proc = ary[1]
|
53
|
+
unpacker_proc = nil
|
54
|
+
if unpacker.has_key?(type)
|
55
|
+
unpacker_proc = unpacker.delete(type)[1]
|
21
56
|
end
|
22
|
-
list << {type: type, class: klass, packer:
|
57
|
+
list << {type: type, class: klass, packer: packer_proc, unpacker: unpacker_proc}
|
23
58
|
end
|
24
59
|
|
25
60
|
# unpacker definition only
|
26
61
|
unpacker.each_pair do |type, ary|
|
27
|
-
list << {type: type, class: ary[0], packer: nil, unpacker: ary[
|
62
|
+
list << {type: type, class: ary[0], packer: nil, unpacker: ary[1]}
|
28
63
|
end
|
29
64
|
|
30
65
|
when :packer
|
31
66
|
packer.each_pair do |klass, ary|
|
32
|
-
|
67
|
+
if ary[1]
|
68
|
+
list << {type: ary[0], class: klass, packer: ary[1]}
|
69
|
+
end
|
33
70
|
end
|
34
71
|
|
35
72
|
when :unpacker
|
36
73
|
unpacker.each_pair do |type, ary|
|
37
|
-
|
74
|
+
if ary[1]
|
75
|
+
list << {type: type, class: ary[0], unpacker: ary[1]}
|
76
|
+
end
|
38
77
|
end
|
39
78
|
|
40
79
|
else
|
@@ -77,5 +116,96 @@ module MessagePack
|
|
77
116
|
packer.full_pack
|
78
117
|
end
|
79
118
|
alias :pack :dump
|
119
|
+
|
120
|
+
def pool(size = 1, **options)
|
121
|
+
Pool.new(
|
122
|
+
frozen? ? self : dup.freeze,
|
123
|
+
size,
|
124
|
+
options.empty? ? nil : options,
|
125
|
+
)
|
126
|
+
end
|
127
|
+
|
128
|
+
class Pool
|
129
|
+
if RUBY_ENGINE == "ruby"
|
130
|
+
class MemberPool
|
131
|
+
def initialize(size, &block)
|
132
|
+
@size = size
|
133
|
+
@new_member = block
|
134
|
+
@members = []
|
135
|
+
end
|
136
|
+
|
137
|
+
def with
|
138
|
+
member = @members.pop || @new_member.call
|
139
|
+
begin
|
140
|
+
yield member
|
141
|
+
ensure
|
142
|
+
# If the pool is already full, we simply drop the extra member.
|
143
|
+
# This is because contrary to a connection pool, creating an extra instance
|
144
|
+
# is extremely unlikely to cause some kind of resource exhaustion.
|
145
|
+
#
|
146
|
+
# We could cycle the members (keep the newer one) but first It's more work and second
|
147
|
+
# the older member might have been created pre-fork, so it might be at least partially
|
148
|
+
# in shared memory.
|
149
|
+
if member && @members.size < @size
|
150
|
+
member.reset
|
151
|
+
@members << member
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
156
|
+
else
|
157
|
+
class MemberPool
|
158
|
+
def initialize(size, &block)
|
159
|
+
@size = size
|
160
|
+
@new_member = block
|
161
|
+
@members = []
|
162
|
+
@mutex = Mutex.new
|
163
|
+
end
|
164
|
+
|
165
|
+
def with
|
166
|
+
member = @mutex.synchronize { @members.pop } || @new_member.call
|
167
|
+
begin
|
168
|
+
yield member
|
169
|
+
ensure
|
170
|
+
member.reset
|
171
|
+
@mutex.synchronize do
|
172
|
+
if member && @members.size < @size
|
173
|
+
@members << member
|
174
|
+
end
|
175
|
+
end
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
def initialize(factory, size, options = nil)
|
182
|
+
options = nil if !options || options.empty?
|
183
|
+
@factory = factory
|
184
|
+
@packers = MemberPool.new(size) { factory.packer(options).freeze }
|
185
|
+
@unpackers = MemberPool.new(size) { factory.unpacker(options).freeze }
|
186
|
+
end
|
187
|
+
|
188
|
+
def load(data)
|
189
|
+
@unpackers.with do |unpacker|
|
190
|
+
unpacker.feed(data)
|
191
|
+
unpacker.full_unpack
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
def dump(object)
|
196
|
+
@packers.with do |packer|
|
197
|
+
packer.write(object)
|
198
|
+
packer.full_pack
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
def unpacker(&block)
|
203
|
+
@unpackers.with(&block)
|
204
|
+
end
|
205
|
+
|
206
|
+
def packer(&block)
|
207
|
+
@packers.with(&block)
|
208
|
+
end
|
209
|
+
end
|
80
210
|
end
|
81
211
|
end
|
data/lib/msgpack/packer.rb
CHANGED
@@ -2,11 +2,20 @@ module MessagePack
|
|
2
2
|
class Packer
|
3
3
|
# see ext for other methods
|
4
4
|
|
5
|
+
# The semantic of duping a packer is just too weird.
|
6
|
+
undef_method :dup
|
7
|
+
undef_method :clone
|
8
|
+
|
9
|
+
def register_type(type, klass, method_name = nil, &block)
|
10
|
+
raise ArgumentError, "expected Module/Class got: #{klass.inspect}" unless klass.is_a?(Module)
|
11
|
+
register_type_internal(type, klass, block || method_name.to_proc)
|
12
|
+
end
|
13
|
+
|
5
14
|
def registered_types
|
6
15
|
list = []
|
7
16
|
|
8
17
|
registered_types_internal.each_pair do |klass, ary|
|
9
|
-
list << {type: ary[0], class: klass, packer: ary[
|
18
|
+
list << {type: ary[0], class: klass, packer: ary[1]}
|
10
19
|
end
|
11
20
|
|
12
21
|
list.sort{|a, b| a[:type] <=> b[:type] }
|
data/lib/msgpack/symbol.rb
CHANGED
@@ -1,9 +1,26 @@
|
|
1
1
|
class Symbol
|
2
|
-
|
3
|
-
|
2
|
+
# to_msgpack_ext is supposed to return a binary string.
|
3
|
+
# The canonical way to do it for symbols would be:
|
4
|
+
# [to_s].pack('A*')
|
5
|
+
# However in this instance we can take a shortcut
|
6
|
+
if method_defined?(:name)
|
7
|
+
alias_method :to_msgpack_ext, :name
|
8
|
+
else
|
9
|
+
alias_method :to_msgpack_ext, :to_s
|
4
10
|
end
|
5
11
|
|
6
12
|
def self.from_msgpack_ext(data)
|
7
|
-
|
13
|
+
# from_msgpack_ext is supposed to parse a binary string.
|
14
|
+
# The canonical way to do it for symbols would be:
|
15
|
+
# data.unpack1('A*').to_sym
|
16
|
+
# However in this instance we can take a shortcut
|
17
|
+
|
18
|
+
# We assume the string encoding is UTF-8, and let Ruby create either
|
19
|
+
# an ASCII symbol or UTF-8 symbol.
|
20
|
+
data.force_encoding(Encoding::UTF_8).to_sym
|
21
|
+
rescue EncodingError
|
22
|
+
# If somehow the string wasn't valid UTF-8 not valid ASCII, we fallback
|
23
|
+
# to what has been the historical behavior of creating a binary symbol
|
24
|
+
data.force_encoding(Encoding::BINARY).to_sym
|
8
25
|
end
|
9
|
-
end
|
26
|
+
end
|
data/lib/msgpack/time.rb
CHANGED
data/lib/msgpack/unpacker.rb
CHANGED
@@ -2,11 +2,24 @@ module MessagePack
|
|
2
2
|
class Unpacker
|
3
3
|
# see ext for other methods
|
4
4
|
|
5
|
+
# The semantic of duping an unpacker is just too weird.
|
6
|
+
undef_method :dup
|
7
|
+
undef_method :clone
|
8
|
+
|
9
|
+
def register_type(type, klass = nil, method_name = nil, &block)
|
10
|
+
if klass && method_name
|
11
|
+
block = klass.method(method_name).to_proc
|
12
|
+
elsif !block_given?
|
13
|
+
raise ArgumentError, "register_type takes either 3 arguments or a block"
|
14
|
+
end
|
15
|
+
register_type_internal(type, klass, block)
|
16
|
+
end
|
17
|
+
|
5
18
|
def registered_types
|
6
19
|
list = []
|
7
20
|
|
8
21
|
registered_types_internal.each_pair do |type, ary|
|
9
|
-
list << {type: type, class: ary[0], unpacker: ary[
|
22
|
+
list << {type: type, class: ary[0], unpacker: ary[1]}
|
10
23
|
end
|
11
24
|
|
12
25
|
list.sort{|a, b| a[:type] <=> b[:type] }
|
data/lib/msgpack/version.rb
CHANGED
data/lib/msgpack.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
require "msgpack/version"
|
2
2
|
|
3
3
|
if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby" # This is same with `/java/ =~ RUBY_VERSION`
|
4
|
-
require "java"
|
5
4
|
require "msgpack/msgpack.jar"
|
6
|
-
org.msgpack.jruby.MessagePackLibrary
|
5
|
+
JRuby::Util.load_ext("org.msgpack.jruby.MessagePackLibrary")
|
7
6
|
else
|
8
7
|
require "msgpack/msgpack"
|
9
8
|
end
|
10
9
|
|
10
|
+
require "msgpack/buffer"
|
11
11
|
require "msgpack/packer"
|
12
12
|
require "msgpack/unpacker"
|
13
13
|
require "msgpack/factory"
|
@@ -18,16 +18,15 @@ require "msgpack/time"
|
|
18
18
|
|
19
19
|
module MessagePack
|
20
20
|
DefaultFactory = MessagePack::Factory.new
|
21
|
-
DEFAULT_EMPTY_PARAMS = {}.freeze
|
22
21
|
|
23
22
|
def load(src, param = nil)
|
24
23
|
unpacker = nil
|
25
24
|
|
26
25
|
if src.is_a? String
|
27
|
-
unpacker = DefaultFactory.unpacker param
|
26
|
+
unpacker = DefaultFactory.unpacker param
|
28
27
|
unpacker.feed_reference src
|
29
28
|
else
|
30
|
-
unpacker = DefaultFactory.unpacker src, param
|
29
|
+
unpacker = DefaultFactory.unpacker src, param
|
31
30
|
end
|
32
31
|
|
33
32
|
unpacker.full_unpack
|
@@ -37,8 +36,8 @@ module MessagePack
|
|
37
36
|
module_function :load
|
38
37
|
module_function :unpack
|
39
38
|
|
40
|
-
def pack(v,
|
41
|
-
packer = DefaultFactory.packer(
|
39
|
+
def pack(v, io = nil, options = nil)
|
40
|
+
packer = DefaultFactory.packer(io, options)
|
42
41
|
packer.write v
|
43
42
|
packer.full_pack
|
44
43
|
end
|
data/msgpack.gemspec
CHANGED
@@ -12,20 +12,23 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.homepage = "http://msgpack.org/"
|
13
13
|
s.require_paths = ["lib"]
|
14
14
|
if /java/ =~ RUBY_PLATFORM
|
15
|
-
s.files = Dir['lib/**/*.rb', 'lib/**/*.jar']
|
15
|
+
s.files = Dir['lib/**/*.rb', 'lib/**/*.jar', 'LICENSE']
|
16
16
|
s.platform = Gem::Platform.new('java')
|
17
17
|
else
|
18
|
-
s.files = `git ls-files`.split("\
|
18
|
+
s.files = `git ls-files -z`.split("\x0").reject do |f|
|
19
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features|bench|doclib|msgpack.org.md|Gemfile|Rakefile)|\.(?:git|circleci|rubocop)|appveyor)})
|
20
|
+
end
|
19
21
|
s.extensions = ["ext/msgpack/extconf.rb"]
|
20
22
|
end
|
21
|
-
s.test_files = `git ls-files -- {test,spec}/*`.split("\n")
|
22
23
|
|
23
|
-
s.required_ruby_version = ">= 2.
|
24
|
+
s.required_ruby_version = ">= 2.5"
|
24
25
|
|
25
26
|
s.add_development_dependency 'bundler'
|
26
27
|
s.add_development_dependency 'rake'
|
27
|
-
s.add_development_dependency 'rake-compiler'
|
28
|
+
s.add_development_dependency 'rake-compiler', ['>= 1.1.9']
|
28
29
|
s.add_development_dependency 'rspec', ['~> 3.3']
|
30
|
+
s.add_development_dependency 'ruby_memcheck'
|
29
31
|
s.add_development_dependency 'yard'
|
30
32
|
s.add_development_dependency 'json'
|
33
|
+
s.add_development_dependency 'benchmark-ips', ['~> 2.10.0']
|
31
34
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: msgpack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2024-10-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -46,14 +46,14 @@ dependencies:
|
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version:
|
49
|
+
version: 1.1.9
|
50
50
|
type: :development
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - ">="
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version:
|
56
|
+
version: 1.1.9
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: rspec
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
@@ -68,6 +68,20 @@ dependencies:
|
|
68
68
|
- - "~>"
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '3.3'
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: ruby_memcheck
|
73
|
+
requirement: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
type: :development
|
79
|
+
prerelease: false
|
80
|
+
version_requirements: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
71
85
|
- !ruby/object:Gem::Dependency
|
72
86
|
name: yard
|
73
87
|
requirement: !ruby/object:Gem::Requirement
|
@@ -96,6 +110,20 @@ dependencies:
|
|
96
110
|
- - ">="
|
97
111
|
- !ruby/object:Gem::Version
|
98
112
|
version: '0'
|
113
|
+
- !ruby/object:Gem::Dependency
|
114
|
+
name: benchmark-ips
|
115
|
+
requirement: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - "~>"
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: 2.10.0
|
120
|
+
type: :development
|
121
|
+
prerelease: false
|
122
|
+
version_requirements: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - "~>"
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: 2.10.0
|
99
127
|
description: MessagePack is a binary-based efficient object serialization library.
|
100
128
|
It enables to exchange structured objects between many languages like JSON. But
|
101
129
|
unlike JSON, it is very fast and small.
|
@@ -108,35 +136,9 @@ extensions:
|
|
108
136
|
- ext/msgpack/extconf.rb
|
109
137
|
extra_rdoc_files: []
|
110
138
|
files:
|
111
|
-
- ".gitignore"
|
112
|
-
- ".rubocop.yml"
|
113
|
-
- ".travis.yml"
|
114
139
|
- ChangeLog
|
115
|
-
- Gemfile
|
116
140
|
- LICENSE
|
117
141
|
- README.md
|
118
|
-
- Rakefile
|
119
|
-
- appveyor.yml
|
120
|
-
- bench/pack.rb
|
121
|
-
- bench/pack_log.rb
|
122
|
-
- bench/pack_log_long.rb
|
123
|
-
- bench/pack_symbols.rb
|
124
|
-
- bench/run.sh
|
125
|
-
- bench/run_long.sh
|
126
|
-
- bench/run_symbols.sh
|
127
|
-
- bench/unpack.rb
|
128
|
-
- bench/unpack_log.rb
|
129
|
-
- bench/unpack_log_long.rb
|
130
|
-
- doclib/msgpack.rb
|
131
|
-
- doclib/msgpack/buffer.rb
|
132
|
-
- doclib/msgpack/core_ext.rb
|
133
|
-
- doclib/msgpack/error.rb
|
134
|
-
- doclib/msgpack/extension_value.rb
|
135
|
-
- doclib/msgpack/factory.rb
|
136
|
-
- doclib/msgpack/packer.rb
|
137
|
-
- doclib/msgpack/time.rb
|
138
|
-
- doclib/msgpack/timestamp.rb
|
139
|
-
- doclib/msgpack/unpacker.rb
|
140
142
|
- ext/java/org/msgpack/jruby/Buffer.java
|
141
143
|
- ext/java/org/msgpack/jruby/Decoder.java
|
142
144
|
- ext/java/org/msgpack/jruby/Encoder.java
|
@@ -176,6 +178,8 @@ files:
|
|
176
178
|
- ext/msgpack/unpacker_ext_registry.c
|
177
179
|
- ext/msgpack/unpacker_ext_registry.h
|
178
180
|
- lib/msgpack.rb
|
181
|
+
- lib/msgpack/bigint.rb
|
182
|
+
- lib/msgpack/buffer.rb
|
179
183
|
- lib/msgpack/core_ext.rb
|
180
184
|
- lib/msgpack/factory.rb
|
181
185
|
- lib/msgpack/packer.rb
|
@@ -185,31 +189,6 @@ files:
|
|
185
189
|
- lib/msgpack/unpacker.rb
|
186
190
|
- lib/msgpack/version.rb
|
187
191
|
- msgpack.gemspec
|
188
|
-
- msgpack.org.md
|
189
|
-
- spec/cases.json
|
190
|
-
- spec/cases.msg
|
191
|
-
- spec/cases_compact.msg
|
192
|
-
- spec/cases_spec.rb
|
193
|
-
- spec/cruby/buffer_io_spec.rb
|
194
|
-
- spec/cruby/buffer_packer.rb
|
195
|
-
- spec/cruby/buffer_spec.rb
|
196
|
-
- spec/cruby/buffer_unpacker.rb
|
197
|
-
- spec/cruby/unpacker_spec.rb
|
198
|
-
- spec/ext_value_spec.rb
|
199
|
-
- spec/exttypes.rb
|
200
|
-
- spec/factory_spec.rb
|
201
|
-
- spec/format_spec.rb
|
202
|
-
- spec/jruby/benchmarks/shootout_bm.rb
|
203
|
-
- spec/jruby/benchmarks/symbolize_keys_bm.rb
|
204
|
-
- spec/jruby/unpacker_spec.rb
|
205
|
-
- spec/msgpack_spec.rb
|
206
|
-
- spec/pack_spec.rb
|
207
|
-
- spec/packer_spec.rb
|
208
|
-
- spec/random_compat.rb
|
209
|
-
- spec/spec_helper.rb
|
210
|
-
- spec/timestamp_spec.rb
|
211
|
-
- spec/unpack_spec.rb
|
212
|
-
- spec/unpacker_spec.rb
|
213
192
|
homepage: http://msgpack.org/
|
214
193
|
licenses:
|
215
194
|
- Apache 2.0
|
@@ -222,39 +201,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
222
201
|
requirements:
|
223
202
|
- - ">="
|
224
203
|
- !ruby/object:Gem::Version
|
225
|
-
version: '2.
|
204
|
+
version: '2.5'
|
226
205
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
227
206
|
requirements:
|
228
207
|
- - ">="
|
229
208
|
- !ruby/object:Gem::Version
|
230
209
|
version: '0'
|
231
210
|
requirements: []
|
232
|
-
rubygems_version: 3.
|
211
|
+
rubygems_version: 3.5.11
|
233
212
|
signing_key:
|
234
213
|
specification_version: 4
|
235
214
|
summary: MessagePack, a binary-based efficient data interchange format.
|
236
|
-
test_files:
|
237
|
-
- spec/cases.json
|
238
|
-
- spec/cases.msg
|
239
|
-
- spec/cases_compact.msg
|
240
|
-
- spec/cases_spec.rb
|
241
|
-
- spec/cruby/buffer_io_spec.rb
|
242
|
-
- spec/cruby/buffer_packer.rb
|
243
|
-
- spec/cruby/buffer_spec.rb
|
244
|
-
- spec/cruby/buffer_unpacker.rb
|
245
|
-
- spec/cruby/unpacker_spec.rb
|
246
|
-
- spec/ext_value_spec.rb
|
247
|
-
- spec/exttypes.rb
|
248
|
-
- spec/factory_spec.rb
|
249
|
-
- spec/format_spec.rb
|
250
|
-
- spec/jruby/benchmarks/shootout_bm.rb
|
251
|
-
- spec/jruby/benchmarks/symbolize_keys_bm.rb
|
252
|
-
- spec/jruby/unpacker_spec.rb
|
253
|
-
- spec/msgpack_spec.rb
|
254
|
-
- spec/pack_spec.rb
|
255
|
-
- spec/packer_spec.rb
|
256
|
-
- spec/random_compat.rb
|
257
|
-
- spec/spec_helper.rb
|
258
|
-
- spec/timestamp_spec.rb
|
259
|
-
- spec/unpack_spec.rb
|
260
|
-
- spec/unpacker_spec.rb
|
215
|
+
test_files: []
|
data/.gitignore
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
*.o
|
2
|
-
*.so
|
3
|
-
*.bundle
|
4
|
-
*.gem
|
5
|
-
*.class
|
6
|
-
*.jar
|
7
|
-
doc
|
8
|
-
.yardoc
|
9
|
-
.bundle
|
10
|
-
Gemfile*
|
11
|
-
pkg
|
12
|
-
test/debug.log
|
13
|
-
*~
|
14
|
-
*.swp
|
15
|
-
/rdoc
|
16
|
-
tmp
|
17
|
-
.classpath
|
18
|
-
.project
|
19
|
-
.settings
|
20
|
-
/nbproject/private/
|
21
|
-
coverage/
|
22
|
-
.idea/
|
23
|
-
.ruby-version
|
data/.rubocop.yml
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
# This configuration was generated by `rubocop --auto-gen-config`
|
2
|
-
# on 2015-03-09 17:42:55 +0100 using RuboCop version 0.29.1.
|
3
|
-
# The point is for the user to remove these configuration records
|
4
|
-
# one by one as the offenses are removed from the code base.
|
5
|
-
# Note that changes in the inspected code, or installation of new
|
6
|
-
# versions of RuboCop, may require this file to be generated again.
|
7
|
-
|
8
|
-
AllCops:
|
9
|
-
TargetRubyVersion: 2.4
|
10
|
-
|
11
|
-
# Offense count: 3
|
12
|
-
Lint/AmbiguousOperator:
|
13
|
-
Enabled: false
|
14
|
-
|
15
|
-
# Offense count: 1
|
16
|
-
# Configuration parameters: AllowSafeAssignment.
|
17
|
-
Lint/AssignmentInCondition:
|
18
|
-
Enabled: false
|
19
|
-
|
20
|
-
# Offense count: 1
|
21
|
-
Security/Eval:
|
22
|
-
Enabled: false
|
23
|
-
|
24
|
-
# Offense count: 3
|
25
|
-
# Cop supports --auto-correct.
|
26
|
-
Lint/UnusedBlockArgument:
|
27
|
-
Enabled: false
|
28
|
-
|
29
|
-
# Offense count: 35
|
30
|
-
# Cop supports --auto-correct.
|
31
|
-
Lint/UnusedMethodArgument:
|
32
|
-
Enabled: false
|
33
|
-
|
34
|
-
# Offense count: 128
|
35
|
-
Lint/Void:
|
36
|
-
Enabled: false
|
data/.travis.yml
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
|
3
|
-
branches:
|
4
|
-
only:
|
5
|
-
- master
|
6
|
-
|
7
|
-
gemfile:
|
8
|
-
- Gemfile
|
9
|
-
|
10
|
-
before_install:
|
11
|
-
# This is only for Ruby 2.5.0, Bundler 1.16.1 and rubygems 2.7.3
|
12
|
-
# See https://github.com/travis-ci/travis-ci/issues/8969
|
13
|
-
- "[ \"x2.7.3\" = \"x\"$(gem --version) ] && gem update --system --no-document || echo \"no need to update rubygem\""
|
14
|
-
|
15
|
-
# http://rubies.travis-ci.org/
|
16
|
-
matrix:
|
17
|
-
include:
|
18
|
-
- rvm: 2.4.5
|
19
|
-
os: linux
|
20
|
-
- rvm: 2.5.8
|
21
|
-
os: linux
|
22
|
-
- rvm: 2.6.6
|
23
|
-
os: linux
|
24
|
-
- rvm: 2.6.6
|
25
|
-
os: osx
|
26
|
-
- rvm: 2.7.1
|
27
|
-
os: linux
|
28
|
-
- rvm: ruby-head
|
29
|
-
os: linux
|
30
|
-
- rvm: jruby-head
|
31
|
-
os: linux
|
32
|
-
- rvm: jruby-19mode
|
33
|
-
os: linux
|
34
|
-
allow_failures:
|
35
|
-
- rvm: 2.6.1
|
36
|
-
os: osx
|
37
|
-
- rvm: ruby-head
|
38
|
-
- rvm: jruby-head
|
39
|
-
- rvm: jruby-19mode
|