Upgrade to 1.46.0
[platform/upstream/nghttp2.git] / doc / nghttp2_hd_deflate_change_table_size.rst
1
2 nghttp2_hd_deflate_change_table_size
3 ====================================
4
5 Synopsis
6 --------
7
8 *#include <nghttp2/nghttp2.h>*
9
10 .. function:: int nghttp2_hd_deflate_change_table_size(nghttp2_hd_deflater *deflater, size_t settings_max_dynamic_table_size)
11
12     
13     Changes header table size of the *deflater* to
14     *settings_max_dynamic_table_size* bytes.  This may trigger eviction
15     in the dynamic table.
16     
17     The *settings_max_dynamic_table_size* should be the value received
18     in SETTINGS_HEADER_TABLE_SIZE.
19     
20     The deflater never uses more memory than
21     ``max_deflate_dynamic_table_size`` bytes specified in
22     `nghttp2_hd_deflate_new()`.  Therefore, if
23     *settings_max_dynamic_table_size* >
24     ``max_deflate_dynamic_table_size``, resulting maximum table size
25     becomes ``max_deflate_dynamic_table_size``.
26     
27     This function returns 0 if it succeeds, or one of the following
28     negative error codes:
29     
30     :macro:`nghttp2_error.NGHTTP2_ERR_NOMEM`
31         Out of memory.