Lines Matching refs:deflater

702 int nghttp2_hd_deflate_init(nghttp2_hd_deflater *deflater, nghttp2_mem *mem)  in nghttp2_hd_deflate_init()  argument
705 deflater, NGHTTP2_HD_DEFAULT_MAX_DEFLATE_BUFFER_SIZE, mem); in nghttp2_hd_deflate_init()
708 int nghttp2_hd_deflate_init2(nghttp2_hd_deflater *deflater, in nghttp2_hd_deflate_init2() argument
713 rv = hd_context_init(&deflater->ctx, mem); in nghttp2_hd_deflate_init2()
718 hd_map_init(&deflater->map); in nghttp2_hd_deflate_init2()
721 deflater->notify_table_size_change = 1; in nghttp2_hd_deflate_init2()
722 deflater->ctx.hd_table_bufsize_max = max_deflate_dynamic_table_size; in nghttp2_hd_deflate_init2()
724 deflater->notify_table_size_change = 0; in nghttp2_hd_deflate_init2()
727 deflater->deflate_hd_table_bufsize_max = max_deflate_dynamic_table_size; in nghttp2_hd_deflate_init2()
728 deflater->min_hd_table_bufsize_max = UINT32_MAX; in nghttp2_hd_deflate_init2()
780 void nghttp2_hd_deflate_free(nghttp2_hd_deflater *deflater) in nghttp2_hd_deflate_free() argument
782 hd_context_free(&deflater->ctx); in nghttp2_hd_deflate_free()
1274 int nghttp2_hd_deflate_change_table_size(nghttp2_hd_deflater *deflater, in nghttp2_hd_deflate_change_table_size() argument
1278 deflater->deflate_hd_table_bufsize_max); in nghttp2_hd_deflate_change_table_size()
1280 deflater->ctx.hd_table_bufsize_max = next_bufsize; in nghttp2_hd_deflate_change_table_size()
1282 deflater->min_hd_table_bufsize_max = in nghttp2_hd_deflate_change_table_size()
1283 nghttp2_min(deflater->min_hd_table_bufsize_max, next_bufsize); in nghttp2_hd_deflate_change_table_size()
1285 deflater->notify_table_size_change = 1; in nghttp2_hd_deflate_change_table_size()
1287 hd_context_shrink_table_size(&deflater->ctx, &deflater->map); in nghttp2_hd_deflate_change_table_size()
1360 static int hd_deflate_decide_indexing(nghttp2_hd_deflater *deflater, in hd_deflate_decide_indexing() argument
1369 deflater->ctx.hd_table_bufsize_max * 3 / 4) { in hd_deflate_decide_indexing()
1376 static int deflate_nv(nghttp2_hd_deflater *deflater, nghttp2_bufs *bufs, in deflate_nv() argument
1390 mem = deflater->ctx.mem; in deflate_nv()
1408 : hd_deflate_decide_indexing(deflater, nv, token); in deflate_nv()
1410 res = search_hd_table(&deflater->ctx, nv, token, indexing_mode, in deflate_nv()
1411 &deflater->map, hash); in deflate_nv()
1434 hd_nv.name = nghttp2_hd_table_get(&deflater->ctx, (size_t)idx).name; in deflate_nv()
1453 rv = add_hd_table_incremental(&deflater->ctx, &hd_nv, &deflater->map, in deflate_nv()
1475 int nghttp2_hd_deflate_hd_bufs(nghttp2_hd_deflater *deflater, in nghttp2_hd_deflate_hd_bufs() argument
1482 if (deflater->ctx.bad) { in nghttp2_hd_deflate_hd_bufs()
1486 if (deflater->notify_table_size_change) { in nghttp2_hd_deflate_hd_bufs()
1489 min_hd_table_bufsize_max = deflater->min_hd_table_bufsize_max; in nghttp2_hd_deflate_hd_bufs()
1491 deflater->notify_table_size_change = 0; in nghttp2_hd_deflate_hd_bufs()
1492 deflater->min_hd_table_bufsize_max = UINT32_MAX; in nghttp2_hd_deflate_hd_bufs()
1494 if (deflater->ctx.hd_table_bufsize_max > min_hd_table_bufsize_max) { in nghttp2_hd_deflate_hd_bufs()
1502 rv = emit_table_size(bufs, deflater->ctx.hd_table_bufsize_max); in nghttp2_hd_deflate_hd_bufs()
1510 rv = deflate_nv(deflater, bufs, &nv[i]); in nghttp2_hd_deflate_hd_bufs()
1522 deflater->ctx.bad = 1; in nghttp2_hd_deflate_hd_bufs()
1526 ssize_t nghttp2_hd_deflate_hd(nghttp2_hd_deflater *deflater, uint8_t *buf, in nghttp2_hd_deflate_hd() argument
1533 mem = deflater->ctx.mem; in nghttp2_hd_deflate_hd()
1541 rv = nghttp2_hd_deflate_hd_bufs(deflater, &bufs, nv, nvlen); in nghttp2_hd_deflate_hd()
1558 ssize_t nghttp2_hd_deflate_hd_vec(nghttp2_hd_deflater *deflater, in nghttp2_hd_deflate_hd_vec() argument
1567 mem = deflater->ctx.mem; in nghttp2_hd_deflate_hd_vec()
1575 rv = nghttp2_hd_deflate_hd_bufs(deflater, &bufs, nv, nvlen); in nghttp2_hd_deflate_hd_vec()
1592 size_t nghttp2_hd_deflate_bound(nghttp2_hd_deflater *deflater, in nghttp2_hd_deflate_bound() argument
1597 (void)deflater; in nghttp2_hd_deflate_bound()
1632 nghttp2_hd_deflater *deflater; in nghttp2_hd_deflate_new2() local
1638 deflater = nghttp2_mem_malloc(mem, sizeof(nghttp2_hd_deflater)); in nghttp2_hd_deflate_new2()
1640 if (deflater == NULL) { in nghttp2_hd_deflate_new2()
1644 rv = nghttp2_hd_deflate_init2(deflater, deflate_hd_table_bufsize_max, mem); in nghttp2_hd_deflate_new2()
1647 nghttp2_mem_free(mem, deflater); in nghttp2_hd_deflate_new2()
1652 *deflater_ptr = deflater; in nghttp2_hd_deflate_new2()
1657 void nghttp2_hd_deflate_del(nghttp2_hd_deflater *deflater) in nghttp2_hd_deflate_del() argument
1661 mem = deflater->ctx.mem; in nghttp2_hd_deflate_del()
1663 nghttp2_hd_deflate_free(deflater); in nghttp2_hd_deflate_del()
1665 nghttp2_mem_free(mem, deflater); in nghttp2_hd_deflate_del()
2385 size_t nghttp2_hd_deflate_get_num_table_entries(nghttp2_hd_deflater *deflater) in nghttp2_hd_deflate_get_num_table_entries() argument
2387 return get_max_index(&deflater->ctx); in nghttp2_hd_deflate_get_num_table_entries()
2391 nghttp2_hd_deflater *deflater, size_t idx) in nghttp2_hd_deflate_get_table_entry() argument
2393 return hd_get_table_entry(&deflater->ctx, idx); in nghttp2_hd_deflate_get_table_entry()
2396 size_t nghttp2_hd_deflate_get_dynamic_table_size(nghttp2_hd_deflater *deflater) in nghttp2_hd_deflate_get_dynamic_table_size() argument
2398 return deflater->ctx.hd_table_bufsize; in nghttp2_hd_deflate_get_dynamic_table_size()
2402 nghttp2_hd_deflater *deflater) in nghttp2_hd_deflate_get_max_dynamic_table_size() argument
2404 return deflater->ctx.hd_table_bufsize_max; in nghttp2_hd_deflate_get_max_dynamic_table_size()