1#ifndef LITESPEED_QPACK_TEST_H
2#define LITESPEED_QPACK_TEST_H 1
3
4#ifndef LS_QPACK_USE_LARGE_TABLES
5#define LS_QPACK_USE_LARGE_TABLES 1
6#endif
7
8#if !LS_QPACK_USE_LARGE_TABLES
9#define lsqpack_huff_decode_full lsqpack_huff_decode
10#endif
11
12int
13lsqpack_enc_enc_str (unsigned prefix_bits, unsigned char *const dst,
14    size_t dst_len, const unsigned char *str, unsigned str_len);
15
16unsigned char *
17lsqpack_enc_int (unsigned char *dst, unsigned char *const end, uint64_t value,
18                                                        unsigned prefix_bits);
19
20int
21lsqpack_dec_int (const unsigned char **src_p, const unsigned char *src_end,
22                 unsigned prefix_bits, uint64_t *value_p,
23                 struct lsqpack_dec_int_state *state);
24
25struct huff_decode_retval
26{
27    enum
28    {
29        HUFF_DEC_OK,
30        HUFF_DEC_END_SRC,
31        HUFF_DEC_END_DST,
32        HUFF_DEC_ERROR,
33    }                       status;
34    unsigned                n_dst;
35    unsigned                n_src;
36};
37
38struct huff_decode_retval
39lsqpack_huff_decode_full (const unsigned char *src, int src_len,
40            unsigned char *dst, int dst_len,
41            struct lsqpack_huff_decode_state *state, int final);
42
43int
44lsqpack_find_in_static_headers (uint32_t name_hash, const char *name,
45                                                        unsigned name_len);
46
47#endif
48