rahimizad / MessagePack

It's like JSON, but fast and small…and Swift! – msgpack.org[Swift]

Home Page:http://msgpack.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MessagePack

Travis Zewo Swift Platform License Slack

MessagePack is an efficient binary serialization format. It lets you exchange data among multiple languages like JSON. But it's faster and smaller. Small integers are encoded into a single byte, and typical short strings require only one extra byte in addition to the strings themselves.

Usage

import MessagePack

let packed = pack(.UInt(42))
//packed is [0x2a]
let unpacked = try? unpack([0x2a])
//unpacked is 42

let packed = pack([0, 1, 2, 3, 4]) 
//packed is [0x95, 0x00, 0x01, 0x02, 0x03, 0x04]

...

//you can find more examples in Tests folder

Installation

import PackageDescription

let package = Package(
    dependencies: [
        .Package(url: "https://github.com/antonmes/MessagePack.git", majorVersion: 0, minor: 2)
    ]
)

Community

Slack

Join us on Slack.

License

MessagePack is released under the MIT license. See LICENSE for details.

About

It's like JSON, but fast and small…and Swift! – msgpack.org[Swift]

http://msgpack.org

License:MIT License


Languages

Language:Swift 100.0%