2 Header file for bitio.c.
4 Part of the swftools package.
6 Copyright (c) 2001 Matthias Kramm <kramm@quiss.org>
8 This file is distributed under the GPL, see file COPYING for details */
14 #include "../lib/rfxswf.h"
32 void reader_resetbits(struct reader_t*);
33 void reader_init(struct reader_t*,uchar*newdata, int newlength);
34 void reader_skip(struct reader_t*,int length);
35 void reader_input1(struct reader_t*, void*target);
36 void reader_input2(struct reader_t*, void*target);
37 void reader_input4(struct reader_t*, void*target);
38 uchar*reader_getinputpos(struct reader_t*);
39 int reader_getinputlength(struct reader_t*);
40 void reader_setinputpos(struct reader_t*,uchar*pos);
41 u32 reader_readbit(struct reader_t*);
42 void reader_readbits(struct reader_t*,u32*val,int num);
43 void reader_readsbits(struct reader_t*,s32*val,int num);
44 u32 reader_getbits(struct reader_t*,int num);
45 s32 reader_getsbits(struct reader_t*,int num);
46 u8 reader_readu8(struct reader_t*);
47 u16 reader_readu16(struct reader_t*);
48 u32 reader_readu32(struct reader_t*);
50 void writer_init(struct writer_t*w, u8*data, int maxlength);
51 void writer_write(struct writer_t*w, void*data, int length);
52 void* writer_getpos(struct writer_t*w);
53 void writer_writebit(struct writer_t*w, int bit);
54 void writer_writebits(struct writer_t*w, u32 data, int bits);
55 void writer_writeu8(struct writer_t*w, u8 value);
56 void writer_writeu16(struct writer_t*w, u16 value);
57 void writer_writeu32(struct writer_t*w, u32 value);
58 void writer_resetbits(struct writer_t*w);