32 lines
701 B
C
32 lines
701 B
C
#ifndef FX_DS_BITBUFFER_H_
|
|
#define FX_DS_BITBUFFER_H_
|
|
|
|
#include <fx/macros.h>
|
|
|
|
FX_DECLS_BEGIN;
|
|
|
|
FX_DECLARE_TYPE(fx_bitbuffer);
|
|
|
|
FX_TYPE_CLASS_DECLARATION_BEGIN(fx_bitbuffer)
|
|
;
|
|
FX_TYPE_CLASS_DECLARATION_END(fx_bitbuffer);
|
|
|
|
FX_API fx_status fx_bitbuffer_put_bit(fx_bitbuffer *buf, int bit);
|
|
FX_API fx_status fx_bitbuffer_put_bool(fx_bitbuffer *buf, bool b);
|
|
FX_API fx_status
|
|
fx_bitbuffer_put_int(fx_bitbuffer *buf, uint64_t v, unsigned int nr_bits);
|
|
FX_API fx_status fx_bitbuffer_put_bytes(
|
|
fx_bitbuffer *buf,
|
|
const void *p,
|
|
size_t len,
|
|
size_t bits_per_byte);
|
|
FX_API fx_status fx_bitbuffer_put_string(
|
|
fx_bitbuffer *buf,
|
|
const char *p,
|
|
size_t len,
|
|
size_t bits_per_char);
|
|
|
|
FX_DECLS_END;
|
|
|
|
#endif
|