comparison src/http/v2/ngx_http_v2_encode.c @ 7977:336084ff943b

Moved Huffman coding out of HTTP/2. ngx_http_v2_huff_decode.c and ngx_http_v2_huff_encode.c are renamed to ngx_http_huff_decode.c and ngx_http_huff_encode.c.
author Ruslan Ermilov <ru@nginx.com>
date Tue, 21 Dec 2021 07:54:16 +0300
parents 87e9e4aabf1b
children
comparison
equal deleted inserted replaced
7976:76aea0ad78e5 7977:336084ff943b
18 ngx_http_v2_string_encode(u_char *dst, u_char *src, size_t len, u_char *tmp, 18 ngx_http_v2_string_encode(u_char *dst, u_char *src, size_t len, u_char *tmp,
19 ngx_uint_t lower) 19 ngx_uint_t lower)
20 { 20 {
21 size_t hlen; 21 size_t hlen;
22 22
23 hlen = ngx_http_v2_huff_encode(src, len, tmp, lower); 23 hlen = ngx_http_huff_encode(src, len, tmp, lower);
24 24
25 if (hlen > 0) { 25 if (hlen > 0) {
26 *dst = NGX_HTTP_V2_ENCODE_HUFF; 26 *dst = NGX_HTTP_V2_ENCODE_HUFF;
27 dst = ngx_http_v2_write_int(dst, ngx_http_v2_prefix(7), hlen); 27 dst = ngx_http_v2_write_int(dst, ngx_http_v2_prefix(7), hlen);
28 return ngx_cpymem(dst, tmp, hlen); 28 return ngx_cpymem(dst, tmp, hlen);