Skip to content

Instantly share code, notes, and snippets.

@frsyuki
Created June 20, 2012 01:25
Show Gist options
  • Save frsyuki/2957566 to your computer and use it in GitHub Desktop.
Save frsyuki/2957566 to your computer and use it in GitHub Desktop.
<div id="qs-ruby" class="qs">
<h4>Ruby</h4>
<ul class="hlist">
<li><a href="http://msgpack.org/rdoc/current/MessagePack.html">API Reference</a></li>
<li><a href="http://rubygems.org/gems/msgpack">RubyGems</a></li>
</ul>
<pre class="prettyprint">gem install msgpack</pre>
<pre class="prettyprint">require "msgpack"
msg = [1,2,3].to_msgpack #=&gt; "\x93\x01\x02\x03"
MessagePack.unpack(msg) #=&gt; [1,2,3]</pre>
<p>Ruby implementation provides <a href="http://msgpack.org/rdoc/current/MessagePack/Unpacker.html">streaming deserializer</a>.</p>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment