VLC 4.0.0-dev
hpack.h
Go to the documentation of this file.
1/*****************************************************************************
2 * hpack.h: HPACK Header Compression for HTTP/2
3 *****************************************************************************
4 * Copyright (C) 2015 RĂ©mi Denis-Courmont
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19 *****************************************************************************/
20
21/**
22 * \defgroup hpack HPACK compression
23 * HTTP/2 header compression (HPACK)
24 * \ingroup h2
25 * @{
26 */
27
28struct hpack_decoder;
29
30struct hpack_decoder *hpack_decode_init(size_t header_table_size);
32
33int hpack_decode(struct hpack_decoder *dec, const uint8_t *data,
34 size_t length, char *headers[][2], unsigned max);
35
36size_t hpack_encode_hdr_neverindex(uint8_t *restrict buf, size_t size,
37 const char *name, const char *value);
38size_t hpack_encode(uint8_t *restrict buf, size_t size,
39 const char *const headers[][2], unsigned count);
40
41/** @} */
size_t count
Definition: core.c:403
size_t hpack_encode(uint8_t *restrict buf, size_t size, const char *const headers[][2], unsigned count)
Definition: hpackenc.c:154
struct hpack_decoder * hpack_decode_init(size_t header_table_size)
Definition: hpack.c:72
size_t hpack_encode_hdr_neverindex(uint8_t *restrict buf, size_t size, const char *name, const char *value)
Definition: hpackenc.c:120
void hpack_decode_destroy(struct hpack_decoder *)
Definition: hpack.c:85
int hpack_decode(struct hpack_decoder *dec, const uint8_t *data, size_t length, char *headers[][2], unsigned max)
Definition: hpack.c:575
const char name[16]
Definition: httpd.c:1281
Definition: hpack.c:65
size_t size
Definition: hpack.c:68