- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.h
More file actions
Latest commit
28 lines (17 loc) · 411 Bytes
/
Copy pathcode.h
File metadata and controls
28 lines (17 loc) · 411 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef__CODE_H__
#define__CODE_H__
#include"defines.h"
#include<stdbool.h>
#include<stdint.h>
typedefstructCode {
uint32_ttop;
uint8_tbits[MAX_CODE_SIZE];
} Code;
Codecode_init(void);
uint32_tcode_size(Code*c);
boolcode_empty(Code*c);
boolcode_full(Code*c);
boolcode_push_bit(Code*c, uint8_tbit);
boolcode_pop_bit(Code*c, uint8_t*bit);
voidcode_print(Code*c);
#endif