summaryrefslogtreecommitdiffstats
path: root/bitsplit.h
diff options
context:
space:
mode:
Diffstat (limited to 'bitsplit.h')
-rw-r--r--bitsplit.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/bitsplit.h b/bitsplit.h
new file mode 100644
index 0000000..8a53f3e
--- /dev/null
+++ b/bitsplit.h
@@ -0,0 +1,21 @@
+#ifndef foobitsplithfoo
+#define foobitsplithfoo
+
+#include <inttypes.h>
+#include <sys/types.h>
+
+struct bitsplit_state {
+ uint8_t in;
+ int n_in;
+ int maxbits_in;
+
+ uint8_t out;
+ int n_out;
+ int maxbits_out;
+};
+
+
+void bitsplit_init(struct bitsplit_state *s, int maxbits_in, int maxbits_out);
+void bitsplit(struct bitsplit_state *s, uint8_t *src, size_t *src_l, uint8_t *dst, size_t *dst_l);
+
+#endif