jruby-msgpack
Helps bridge that gap between the native Java msgpack library and JRuby!
Implemented:
MessagePack::Unpacker
Installation
Add this line to your application's Gemfile:
gem 'jruby-msgpack'
And then execute:
$ bundle
Or install it yourself as:
$ gem install jruby-msgpack
Usage
Unpacking a File (or Other IO)
require "jruby-msgpack"
unpacker = MessagePack::Unpacker.new
File.open("/my/file.mpac", "r") do |io|
begin
buffer = ""
while io.sysread(1024, buffer)
unpacker.feed(buffer)
unpacker.each do |obj|
puts obj
end
end
rescue EOFError
# EOF reached
end
end
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request