Recursive Length Prefix encoding written in Swift
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Example
RLPSwift.xcodeproj Updated swift version to 4.2 (#6) Oct 2, 2018
Source Rename UIInt32+Extensions as suggested on #3 Jul 28, 2018
Tests Update and organize tests Feb 3, 2018
fastlane Update travis.yml, add Scanfile Feb 3, 2018
.gitignore init Jan 31, 2018
.swift-version Add podspec & .swift-version Feb 1, 2018
.travis.yml Update travis.yml, add Scanfile Feb 3, 2018
LICENSE Add LICENSE file Jan 31, 2018
README.md Updated swift version to 4.2 (#6) Oct 2, 2018
RLPSwift.podspec Update README.md, bump versions Feb 3, 2018

README.md

RLPSwift

Swift 4.2 Platforms iOS pod v0.0.3 Travis CI codecov.io

This is a basic Swift implementation of Recursive Length Prefix Encoding, a serialisation method for encoding arbitrarily structured binary data (byte arrays).

You can read more about it here:

Interface

// Encoding Data
RLP.encode(_ data: Data) -> Data

// Encoding String
RLP.encode(_ string: String, with encoding: String.Encoding = .ascii) throws -> Data

// Encoding nested array of Data
RLP.encode(nestedArrayOfData array: [Any]) throws -> Data

// Encoding nested array of String
RLP.encode(nestedArrayOfString array: [Any], encodeStringsWith encoding: String.Encoding = .ascii) throws -> Data

Installation

RLPSwift is available through CocoaPods.

To install RLPSwift via cocoapods, add the following line to your Podfile:

pod 'RLPSwift'

Then run pod install.

In any file you'd like to use RLPSwift in, don't forget to import the framework with import RLPSwift.

License

RLPSwift is released under an MIT license. See LICENSE for more information.