1
0
Fork
You've already forked base128
0
esoteric multi-byte base128 encoding inspired by rfc4648
  • Zig 100%
2025年11月25日 22:28:00 +00:00
base128.zig WIP+ base128 zig implementation 2025年11月25日 22:28:00 +00:00
build.zig WIP+ base128 zig implementation 2025年11月25日 22:28:00 +00:00
build.zig.zon WIP+ base128 zig implementation 2025年11月25日 22:28:00 +00:00
command.zig WIP+ base128 zig implementation 2025年11月25日 22:28:00 +00:00
LICENSE + description 2025年11月25日 22:23:13 +00:00
README.md + description 2025年11月25日 22:23:13 +00:00

base128

esoteric multi-byte base128 encoding inspired by rfc 4648 with this presupplied alphabet:

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/
ÆÐΓΔƎƏƐƔIƖŊΛŒƆKΠΦΨΣΘÞƲƷΞØΩαβγδεζηθιæκλμνðπψρστυφǝξəωŋœɔʃþʋʒøʔ%-_

yes, base256 would trivialize the transform to a lookup and remove the need for padding. (ᴗ͈ˬᴗ͈)ꕤ

the standard library contains an rfc compliant implementation of base64, on github, there's geofrey ernest's base32

installation

zig fetch --save git+https://codeberg.org/cpli/base128

Then update your build.zig to load the module:

constbase128=b.dependency("base128",.{});exe.root_module.addImport("base128",base128.module("base128"));

usage

usage: base128 [-d] [-w column] [file]

description

the base128 utility acts as a base128 decoder when passed the --decode (or -d) flag and as a base128 encoder otherwise. as a decoder it only accepts raw base128 input and as an encoder it does not produce the framing lines. base128 reads standard input or file if it is provided and writes to standard output.