• Stars
    star
    120
  • Rank 295,983 (Top 6 %)
  • Language
    C++
  • License
    MIT License
  • Created over 8 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A tiny MessagePack library for C++11 (msgpack.org[C++11])

Build Issues MIT

What is msgpack11 ?

msgpack11 is a tiny MsgPack library for C++11, providing MsgPack parsing and serialization.
This library is inspired by json11.
The API of msgpack11 is designed to be similar with json11.

Installation

  • Using CMake

      git clone [email protected]:ar90n/msgpack11.git
      mkdir build
      cd build
      cmake ../msgpack11
      make && make install
    
  • Using Buck

      git clone [email protected]:ar90n/msgpack11.git
      cd msgpack11
      buck build :msgpack11
    

Example

MsgPack my_msgpack = MsgPack::object {
    { "key1", "value1" },
    { "key2", false },
    { "key3", MsgPack::array { 1, 2, 3 } },
};

//access to elements
std::cout << my_msgpack["key1"].string_value();

//serialize
std::string msgpack_bytes = my_msgpack.dump();

//deserialize
std::string err;
MsgPack des_msgpack = MsgPack::parse(msgpack_bytes, err);

There are more specific examples in example.cpp. Please see it.

Benchmark

Derived from schemaless-benchmarks

Library Binary size time[ms] @ Smallest time[ms] @ Small time[ms] @ Medium time[ms] @ Large time[ms] @ Largest
msgpack-c-pack(v2.1.4) 6649 0.55 2.38 43.22 711.75 8748.20
msgpack-c-unpack(v2.1.4) 21804 1.34 6.00 83.09 714.64 11192.32
msgpack11-pack(v0.0.9) 99844 20.80 130.04 1063.24 10466.65 136640.99
msgpack11-unpack(v0.0.9) 99460 13.31 92.54 786.73 7345.43 99119.56

CPU : 2.6 GHz Intel Core i7
Memory : 16 GB 2133 MHz LPDDR3
Git revision : 6f6b4302b68b3c88312eb24367418b7fce81298c

Feature

  • Support serialization and deserialization.

Acknowledgement

License

This software is released under the MIT License, see LICENSE.txt.

More Repositories

1

serverless-s3-local

Serverless s3 local plugin.
JavaScript
213
star
2

poisson-blending-in-5lines

An implementation of Poisson Blending in 5 lines.
Python
17
star
3

teimpy

Python library for displaying image on terminal.
Python
8
star
4

pytorch-lightning-sam-callback

SAM with pytorch-lightning's Callback API
Python
6
star
5

serverless-plugin-export-endpoints

Export lambda endpoints as json
JavaScript
6
star
6

resaspy

python for RESAS API
Python
6
star
7

paaaaath

useful path like object
Python
5
star
8

vanilla-roll

array-api based simple volume renderer
Python
4
star
9

lab

my laboratory
Jupyter Notebook
4
star
10

mameMalloc

Plain header only implementation of malloc/free.
C
3
star
11

halide_anaconda3

Dockerfile for halide and anaconda3
Shell
2
star
12

alfort

Elm-like interactive application framework for Python
Python
2
star
13

docker-ise-webpack-vnc

ISE Webpack in Docker image
Dockerfile
2
star
14

kkt

A tool for kaggle kernel management.
Python
1
star
15

dcmagick

DICOM Image manipulation tool
Python
1
star
16

mameBitmap

header only library for bitmap images
C++
1
star
17

react-8bit-paint

8bit paint app with React
TypeScript
1
star
18

LogcatVisor

This project aims to develop a software for overlaying logcat output on display.
Java
1
star
19

HighGUI3DCG

C++による簡単実習 3次元CG入門 第2版 のサンプルコードのHighGUIによるバックエンド
C++
1
star
20

mameJpeg

Header only plain jpeg codec
C
1
star
21

countrymaam

Plain ann-search implementation with Go
Go
1
star
22

kmeaaaaans

Simple kmeans clustering algorithm implementation with pure Go
Go
1
star
23

ziglings

Zig
1
star