-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathqmin_internal.h
44 lines (34 loc) · 1021 Bytes
/
qmin_internal.h
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* Copyright (c) 2017 LiteSpeed Technologies Inc. See LICENSE. */
#ifndef QMIN_INTERNAL_H
#define QMIN_INTERNAL_H
struct qmin_hdr_tbl
{
const char *name;
unsigned name_len;
const char *val;
unsigned val_len;
};
struct qmin_huff_encode
{
uint32_t code;
int bits;
};
struct qmin_huff_decode
{
uint8_t state;
uint8_t flags;
uint8_t sym;
};
extern const struct qmin_huff_decode qmin_huff_decode_tables[256][16];
extern const struct qmin_huff_encode qmin_huff_encode_tables[257];
extern const struct qmin_hdr_tbl qmin_stx_tab[QMIN_STATIC_TABLE_N_ENTRIES];
enum qmin_message
qmin_char_to_qmm (unsigned char c);
enum dec_st { DEC_ST_OK, DEC_ST_NOBUF_SRC, DEC_ST_NOBUF_DST, DEC_ST_ERR, };
enum dec_st
qmin_decode_int (const unsigned char **src, const unsigned char *src_end,
unsigned prefix_bits, unsigned *value);
unsigned char *
qmin_encode_int (unsigned char *dst, unsigned char *const end,
uint32_t value, uint8_t prefix_bits);
#endif