Swiftpack.co -  batonPiotr/base85 as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
batonPiotr/base85
iOS Library for base85 encoding/decoding
.package(url: "https://github.com/batonPiotr/base85.git", from: "v1.0.1")

base85

This tool implements ASCII85 and Z85 decoding and encoding.

Installation

Swift Package Manager

This tool can be installed through Swift Package Manager by adding this to your Package.swift:

dependencies: [
    .package(url: "https://github.com/batonPiotr/base85", .upToNextMajor(from: "1.0.0")),
    ...
],

Or add it in Xcode:

  1. File → Add Packages...
  2. Package URL: https://github.com/batonPiotr/base85

Cocoapods

Add to your Podfile following line:

    pod `base85`

Usage

ASCII 85

To encode data:

    let someData: Data
    let encodedString = someData.ascii85Encoded

To decode data:

    let someASCII85EncodedData = "<+ohcEHPu*CER),Dg-(AAoDo:C3=B4F!,CEATAo8BOr<&@=!2AA8c*5"
    let decodedData = Data(ascii85EncodedString: someASCII85EncodedData)

Z85

To encode data:

    let someData: Data
    let encodedString = someData.z85Encoded

To decode data:

    let someZ85EncodedData = "ra]?=ADL#9yAN8bz*c7ww]z]pyisxjB0byAwPw]nxK@r5vs0hwwn=9k"
    guard let decodedData = Data(z85EncodedString: someZ85EncodedData) else {
        return
    }

License

This package is released under The MIT License. See LICENSE for details.

GitHub

link
Stars: 0
Last commit: 5 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Release Notes

First release
5 weeks ago

First public release of the library. Available on Cocoapods and Swift Package Manager.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics