summaryrefslogtreecommitdiffhomepage
path: root/src/http/v2/ngx_http_v2.h
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2016-02-11 15:35:36 +0300
committerValentin Bartenev <vbart@nginx.com>2016-02-11 15:35:36 +0300
commit531e6fbfd6c785a7b42c285c12d3f0721cc989c7 (patch)
treec0c16713a0a42526a22cf1ec20767cae1985eb33 /src/http/v2/ngx_http_v2.h
parent3b9b07377b67b1980512e97663220108695c26ea (diff)
downloadnginx-531e6fbfd6c785a7b42c285c12d3f0721cc989c7.tar.gz
nginx-531e6fbfd6c785a7b42c285c12d3f0721cc989c7.tar.bz2
HTTP/2: implemented HPACK Huffman encoding for response headers.
This reduces the size of headers by over 30% on average. Based on the patch by Vlad Krasnov: http://mailman.nginx.org/pipermail/nginx-devel/2015-December/007682.html
Diffstat (limited to 'src/http/v2/ngx_http_v2.h')
-rw-r--r--src/http/v2/ngx_http_v2.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/http/v2/ngx_http_v2.h b/src/http/v2/ngx_http_v2.h
index 0f0392279..070aa435a 100644
--- a/src/http/v2/ngx_http_v2.h
+++ b/src/http/v2/ngx_http_v2.h
@@ -274,6 +274,8 @@ ngx_int_t ngx_http_v2_table_size(ngx_http_v2_connection_t *h2c, size_t size);
ngx_int_t ngx_http_v2_huff_decode(u_char *state, u_char *src, size_t len,
u_char **dst, ngx_uint_t last, ngx_log_t *log);
+size_t ngx_http_v2_huff_encode(u_char *src, size_t len, u_char *dst,
+ ngx_uint_t lower);
#define ngx_http_v2_prefix(bits) ((1 << (bits)) - 1)