Latest 2.0.0
Homepage https://github.com/yageek/LEB128
License MIT
Platforms ios 8.0, osx 10.9, watchos 2.0, tvos 9.0
Authors

A library helping to deal with Little Endian Base 128.

master:
Build Status
develop:
Build Status

MIT License
Carthage compatible
CocoaPods Compatible
Platform

Install

Carthage

github "yageek/LEB128"

Swift Package Manager

import PackageDescription

let package = Package(
    name: "myPackage",
    dependencies: [
    .Package(url: "https://github.com/yageek/LEB128.git", majorVersion: 1, minor: 0)
])

Cocoapods

pod 'Leb128'

Usage


    /// Encoding
    let buff = ByteBuffer(size: 5)
    let length = encodeUnsignedLEB(buff, value: value)
    print("Value: (buff[0..<length])")

    let value: Int = 16256
    let buff = ByteBuffer(size: 5)
    let length = encodeSignedLEB(buff, value: value)
    print("Value: (buff[0..<length])")

    /// Decoding

    let encodedSigned = decodeUnsignedLEB(ByteBuffer(elements:[0x80, 0x7f]))
    print("Value: (encodedSigned)")

    let encodedUSigned = decodeSignedLEB(ByteBuffer(elements:[0x80, 0x7f]))
    print("Value: (encodedUSigned)")

License

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

Latest podspec

{
    "name": "LEB128",
    "version": "2.0.0",
    "summary": "A library helping to deal with Little Endian Base 128.",
    "homepage": "https://github.com/yageek/LEB128",
    "license": "MIT",
    "authors": {
        "Yannick Heinrich": "[email protected]"
    },
    "social_media_url": "http://twitter.com/yageek",
    "platforms": {
        "ios": "8.0",
        "osx": "10.9",
        "watchos": "2.0",
        "tvos": "9.0"
    },
    "source": {
        "git": "https://github.com/yageek/LEB128.git",
        "tag": "2.0.0"
    },
    "source_files": "Sources/*.swift",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This