libbootstr-c

C bootstring encoding library
git clone https://git.sinitax.com/sinitax/libbootstr-c
Log | Files | Refs | LICENSE | sfeed.txt

bootstr.h (444B)


      1#pragma once
      2
      3#include <stdbool.h>
      4#include <stdint.h>
      5#include <stdlib.h>
      6
      7struct bootstr_cfg {
      8	const uint32_t *base;
      9	ssize_t baselen;
     10	const uint32_t *delim;
     11	bool (*is_basic)(uint32_t c);
     12	ssize_t tmin, tmax;
     13	ssize_t skew, damp;
     14	ssize_t initial_bias;
     15	ssize_t initial_n;
     16};
     17
     18int bootstr_encode(const struct bootstr_cfg *cfg, uint32_t *in, uint32_t **out);
     19int bootstr_decode(const struct bootstr_cfg *cfg, uint32_t *in, uint32_t **out);