feat: libb20 C90 #11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/lib/c90/main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
🧮 libb20 – C90 Library Implementation & Reference CLI
This PR marks the formal transition of libb20 from a proof-of-concept encoder to a proper reusable C90 library, establishing the structure that all future language ports will follow.
🧱 What’s New
🧩 Core Library (
libb20.h/libb20.c)b20_status_str()for human-readable diagnostics.🔧 Utility Layer (
libb20_util.h/.c)🖥️ Reference CLI (
kb20-c90ref)New command-line tool built entirely on the public API.
encode/decode--textor--binmodes--zero <code point>or--alphabet <20 code points>Replaces the previous standalone reference implementation (
kb20c).Reads from stdin, writes to stdout, returns clear status codes.
🧰 Build System
Makefileto compile and link the library and CLI cleanly.make cleantarget.🧪 Verification
Cross-checked output against the original reference:
Verified correct decoding for variable-length tails.
Confirmed proper alphabet validation and duplicate detection.
Verified all error codes via malformed inputs.
🧭 Future Work
📜 Summary
This PR graduates libb20 into its first stable architectural form:
a clean, standards-compliant base-20 codec library designed for reuse,
teaching, and interoperability across languages.