diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-04-18 01:35:53 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-04-18 01:35:53 +0000 |
commit | 783b56d54788f177881d68ae2ec7a7cb4bb38ac4 (patch) | |
tree | 77555207fa13c137e0c8dab8726f2ed96538e075 /bitsplit.h | |
parent | f069d236c79a7cb89542eba5ddc454d03ead5394 (diff) |
Initial commit
git-svn-id: file:///home/lennart/svn/public/vfax/trunk@3 541b366f-4dd8-0310-ae39-b2612fd50714
Diffstat (limited to 'bitsplit.h')
-rw-r--r-- | bitsplit.h | 21 |
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 |