Files
dat-thang/inc/base32768.h
T

17 lines
603 B
C
Raw Normal View History

2026-10-19 00:12:36 -04:00
#ifndef BASE32768_H
#define BASE32768_H
#include <stddef.h>
#include <stdint.h>
/* UTF-8 C-string form of qntm/base32768's BMP-safe Base32768 encoding. */
int base32768_encode(const uint8_t *input, size_t input_length,
char *output, size_t output_capacity);
int base32768_decode(const char *input, uint8_t *output,
size_t output_capacity, size_t *output_length);
/* Enumerate the alphabet: bits=15 selects the 32,768 main characters;
* bits=7 selects the 128 possible final padding characters. */
int base32768_codepoint_at(unsigned bits, uint32_t index, uint32_t *codepoint);
#endif