Latest 0.0.3
License MIT
Platforms ios 9.0

Swift 4.0
Platforms iOS
pod v0.0.3

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:


// 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


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.


Download and drop RLP.swift inside your project.


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

Latest podspec

    "name": "RLPSwift",
    "version": "0.0.3",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "homepage": "",
    "authors": "Aleph Retamal",
    "summary": "Recursive Length Prefix encoding written in Swift",
    "source": {
        "git": "",
        "tag": "v0.0.3"
    "platforms": {
        "ios": "9.0"
    "source_files": "Source",
    "pushed_with_swift_version": "4.0"

Pin It on Pinterest

Share This