Project

packsnap

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
MessagePack is a binary-based efficient object serialization library. It enables to exchange structured objects between many languages like JSON. But unlike JSON, it is very fast and small.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.0.0
~> 1.7
>= 0.8.7
>= 2.10.0
~> 0.8
 Project Readme

Packsnap

MessagePack is great at serializing data quickly.

Snappy is great at compressing data quickly.

Packsnap serializes datastructures using MessagePack and Snappy.

Examples

Packsnap.pack("a simple string")
=> "\x10<\xAFa simple string"

Packsnap.pack(["an array", 3])
=> "\v(\x92\xA8an array\x03"

Packsnap.pack("long key" * 15)
=> "{(\xDA\x00xlong key\xFE\b\x00\xBE\b\x00"

# And a totally useless benchmark (Macbook Air 11")
Benchmark.realtime { 1_000_000.times { Packsnap.pack("value") } }
=> 1.654603

Copyright

MessagePack code copyright 2012 FURUHASHI Sadayuki

Additions copyright Burke Libbey

License: Apache License, Version 2.0