aboutsummaryrefslogtreecommitdiff
path: root/src/http/v3/ngx_http_v3.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/v3/ngx_http_v3.c')
-rw-r--r--src/http/v3/ngx_http_v3.c80
1 files changed, 0 insertions, 80 deletions
diff --git a/src/http/v3/ngx_http_v3.c b/src/http/v3/ngx_http_v3.c
index e804cf6f5..cca84dbc1 100644
--- a/src/http/v3/ngx_http_v3.c
+++ b/src/http/v3/ngx_http_v3.c
@@ -94,83 +94,3 @@ ngx_http_v3_encode_prefix_int(u_char *p, uint64_t value, ngx_uint_t prefix)
return (uintptr_t) p;
}
-
-
-uint64_t
-ngx_http_v3_decode_varlen_int(u_char *p)
-{
- uint64_t value;
- ngx_uint_t len;
-
- len = *p >> 6;
- value = *p & 0x3f;
-
- while (len--) {
- value = (value << 8) + *p++;
- }
-
- return value;
-}
-
-
-int64_t
-ngx_http_v3_decode_prefix_int(u_char **src, size_t len, ngx_uint_t prefix)
-{
- u_char *p;
- int64_t value, thresh;
-
- if (len == 0) {
- return NGX_ERROR;
- }
-
- p = *src;
-
- thresh = (1 << prefix) - 1;
- value = *p++ & thresh;
-
- if (value != thresh) {
- *src = p;
- return value;
- }
-
- value = 0;
-
- /* XXX handle overflows */
-
- while (--len) {
- value = (value << 7) + (*p & 0x7f);
- if ((*p++ & 0x80) == 0) {
- *src = p;
- return value + thresh;
- }
- }
-
- return NGX_ERROR;
-}
-
-
-ngx_int_t
-ngx_http_v3_decode_huffman(ngx_connection_t *c, ngx_str_t *s)
-{
- u_char state, *p, *data;
-
- state = 0;
-
- p = ngx_pnalloc(c->pool, s->len * 8 / 5);
- if (p == NULL) {
- return NGX_ERROR;
- }
-
- data = p;
-
- if (ngx_http_v2_huff_decode(&state, s->data, s->len, &p, 1, c->log)
- != NGX_OK)
- {
- return NGX_ERROR;
- }
-
- s->len = p - data;
- s->data = data;
-
- return NGX_OK;
-}