Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alindeman/jruby-msgpack
https://github.com/alindeman/jruby-msgpack
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/alindeman/jruby-msgpack
- Owner: alindeman
- License: mit
- Created: 2012-02-23T02:36:52.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2012-02-23T17:02:02.000Z (almost 13 years ago)
- Last Synced: 2024-04-24T18:41:32.963Z (8 months ago)
- Language: Ruby
- Homepage:
- Size: 868 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jruby-msgpack
[![Build Status](https://secure.travis-ci.org/alindeman/jruby-msgpack.png)](http://travis-ci.org/alindeman/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)
```ruby
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
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request