Base62 is a tiny package for Base62 encoding/decoding values. It is tested, documented, easy-to-use and supports Apple Platforms, as well as Linux.
I use this as encoding mechanism for my own URL shortener but this is a general purpose implementation that should suffice all use cases that require Base62 encoding/decoding.
Installation
Base62 is distributed using the Swift Package Manager. To install it into a project, add it as a dependency within your Package.swift manifest:
Base62
Base62 is a tiny package for Base62 encoding/decoding values. It is tested, documented, easy-to-use and supports Apple Platforms, as well as Linux.
I use this as encoding mechanism for my own URL shortener but this is a general purpose implementation that should suffice all use cases that require Base62 encoding/decoding.
Installation
Base62 is distributed using the Swift Package Manager. To install it into a project, add it as a dependency within your
Package.swift
manifest:Then import Base62 wherever you’d like to use it:
Usage
Using Base62 is incredibly easy, as it focusses on a single responsibility and does that nicely.
Base62 ships with a single object that provides encoding and decoding functionality.
There are also extensions for
String
andInt
available, if you prefer to use them rather than theBase62
object directly.