1b55d97beSDmitri Tikhonov#ifndef LITESPEED_QPACK_TEST_H
2b55d97beSDmitri Tikhonov#define LITESPEED_QPACK_TEST_H 1
3b55d97beSDmitri Tikhonov
4467c7b1eSDmitri Tikhonov#ifndef LS_QPACK_USE_LARGE_TABLES
5467c7b1eSDmitri Tikhonov#define LS_QPACK_USE_LARGE_TABLES 1
6467c7b1eSDmitri Tikhonov#endif
7467c7b1eSDmitri Tikhonov
8467c7b1eSDmitri Tikhonov#if !LS_QPACK_USE_LARGE_TABLES
9467c7b1eSDmitri Tikhonov#define lsqpack_huff_decode_full lsqpack_huff_decode
10467c7b1eSDmitri Tikhonov#endif
11467c7b1eSDmitri Tikhonov
12b55d97beSDmitri Tikhonovint
13b55d97beSDmitri Tikhonovlsqpack_enc_enc_str (unsigned prefix_bits, unsigned char *const dst,
1400415457SDmitri Tikhonov    size_t dst_len, const unsigned char *str, unsigned str_len);
15b55d97beSDmitri Tikhonov
16b55d97beSDmitri Tikhonovunsigned char *
17b55d97beSDmitri Tikhonovlsqpack_enc_int (unsigned char *dst, unsigned char *const end, uint64_t value,
18b55d97beSDmitri Tikhonov                                                        unsigned prefix_bits);
19b55d97beSDmitri Tikhonov
20b55d97beSDmitri Tikhonovint
216c252d20SDmitri Tikhonovlsqpack_dec_int (const unsigned char **src_p, const unsigned char *src_end,
226c252d20SDmitri Tikhonov                 unsigned prefix_bits, uint64_t *value_p,
236c252d20SDmitri Tikhonov                 struct lsqpack_dec_int_state *state);
24b55d97beSDmitri Tikhonov
25dcd03989SDmitri Tikhonovstruct huff_decode_retval
26dcd03989SDmitri Tikhonov{
27dcd03989SDmitri Tikhonov    enum
28dcd03989SDmitri Tikhonov    {
29dcd03989SDmitri Tikhonov        HUFF_DEC_OK,
30dcd03989SDmitri Tikhonov        HUFF_DEC_END_SRC,
31dcd03989SDmitri Tikhonov        HUFF_DEC_END_DST,
32dcd03989SDmitri Tikhonov        HUFF_DEC_ERROR,
33dcd03989SDmitri Tikhonov    }                       status;
34dcd03989SDmitri Tikhonov    unsigned                n_dst;
35dcd03989SDmitri Tikhonov    unsigned                n_src;
36dcd03989SDmitri Tikhonov};
37dcd03989SDmitri Tikhonov
38dcd03989SDmitri Tikhonovstruct huff_decode_retval
39eb5b40d7SDmitri Tikhonovlsqpack_huff_decode_full (const unsigned char *src, int src_len,
40eb5b40d7SDmitri Tikhonov            unsigned char *dst, int dst_len,
41eb5b40d7SDmitri Tikhonov            struct lsqpack_huff_decode_state *state, int final);
42dcd03989SDmitri Tikhonov
43439cd37dSDmitri Tikhonovint
44439cd37dSDmitri Tikhonovlsqpack_find_in_static_headers (uint32_t name_hash, const char *name,
45439cd37dSDmitri Tikhonov                                                        unsigned name_len);
46439cd37dSDmitri Tikhonov
47b55d97beSDmitri Tikhonov#endif
48