Lines Matching refs:deflater

37   nghttp2_hd_deflater deflater;
59 CU_ASSERT(0 == nghttp2_hd_deflate_init(&deflater, mem));
62 rv = nghttp2_hd_deflate_hd_bufs(&deflater, &bufs, nva1, ARRLEN(nva1));
76 rv = nghttp2_hd_deflate_hd_bufs(&deflater, &bufs, nva2, ARRLEN(nva2));
91 rv = nghttp2_hd_deflate_hd_bufs(&deflater, &bufs, nva3, ARRLEN(nva3));
105 rv = nghttp2_hd_deflate_hd_bufs(&deflater, &bufs, nva4, ARRLEN(nva4));
119 rv = nghttp2_hd_deflate_hd_bufs(&deflater, &bufs, nva5, ARRLEN(nva5));
135 nghttp2_hd_deflate_free(&deflater);
139 nghttp2_hd_deflater deflater;
154 CU_ASSERT(0 == nghttp2_hd_deflate_init(&deflater, mem));
158 rv = nghttp2_hd_deflate_hd_bufs(&deflater, &bufs, nva1, ARRLEN(nva1));
172 rv = nghttp2_hd_deflate_hd_bufs(&deflater, &bufs, nva2, ARRLEN(nva2));
188 nghttp2_hd_deflate_free(&deflater);
661 nghttp2_hd_deflater deflater;
682 nghttp2_hd_deflate_init2(&deflater, 8000, mem);
686 nghttp2_hd_deflate_change_table_size(&deflater, 8000);
690 rv = nghttp2_hd_deflate_hd_bufs(&deflater, &bufs, &nv, 1);
707 nghttp2_hd_deflate_free(&deflater);
713 nghttp2_hd_deflater deflater;
728 nghttp2_hd_deflate_init(&deflater, mem);
733 CU_ASSERT(0 == nghttp2_hd_deflate_change_table_size(&deflater, 8000));
735 CU_ASSERT(4096 == deflater.ctx.hd_table_bufsize_max);
741 rv = nghttp2_hd_deflate_hd_bufs(&deflater, &bufs, nva, 2);
746 CU_ASSERT(2 == deflater.ctx.hd_table.len);
747 CU_ASSERT(63 == nghttp2_hd_deflate_get_num_table_entries(&deflater));
748 CU_ASSERT(4096 == deflater.ctx.hd_table_bufsize_max);
761 CU_ASSERT(0 == nghttp2_hd_deflate_change_table_size(&deflater, 1024));
763 CU_ASSERT(1024 == deflater.ctx.hd_table_bufsize_max);
768 rv = nghttp2_hd_deflate_hd_bufs(&deflater, &bufs, nva, 2);
773 CU_ASSERT(2 == deflater.ctx.hd_table.len);
774 CU_ASSERT(63 == nghttp2_hd_deflate_get_num_table_entries(&deflater));
775 CU_ASSERT(1024 == deflater.ctx.hd_table_bufsize_max);
788 CU_ASSERT(0 == nghttp2_hd_deflate_change_table_size(&deflater, 0));
790 CU_ASSERT(0 == deflater.ctx.hd_table.len);
791 CU_ASSERT(61 == nghttp2_hd_deflate_get_num_table_entries(&deflater));
792 CU_ASSERT(0 == deflater.ctx.hd_table_bufsize_max);
799 rv = nghttp2_hd_deflate_hd_bufs(&deflater, &bufs, nva, 2);
804 CU_ASSERT(0 == deflater.ctx.hd_table.len);
805 CU_ASSERT(61 == nghttp2_hd_deflate_get_num_table_entries(&deflater));
806 CU_ASSERT(0 == deflater.ctx.hd_table_bufsize_max);
819 nghttp2_hd_deflate_free(&deflater);
824 nghttp2_hd_deflate_init2(&deflater, 8192, mem);
829 CU_ASSERT(0 == nghttp2_hd_deflate_change_table_size(&deflater, 8000));
831 CU_ASSERT(8000 == deflater.ctx.hd_table_bufsize_max);
832 CU_ASSERT(8000 == nghttp2_hd_deflate_get_max_dynamic_table_size(&deflater));
837 rv = nghttp2_hd_deflate_hd_bufs(&deflater, &bufs, nva, 2);
842 CU_ASSERT(2 == deflater.ctx.hd_table.len);
843 CU_ASSERT(8000 == deflater.ctx.hd_table_bufsize_max);
854 CU_ASSERT(0 == nghttp2_hd_deflate_change_table_size(&deflater, 16383));
856 CU_ASSERT(8192 == deflater.ctx.hd_table_bufsize_max);
857 CU_ASSERT(8192 == nghttp2_hd_deflate_get_max_dynamic_table_size(&deflater));
863 rv = nghttp2_hd_deflate_hd_bufs(&deflater, &bufs, nva, 2);
868 CU_ASSERT(2 == deflater.ctx.hd_table.len);
869 CU_ASSERT(8192 == deflater.ctx.hd_table_bufsize_max);
890 nghttp2_hd_deflate_free(&deflater);
894 nghttp2_hd_deflate_init2(&deflater, 1024, mem);
897 CU_ASSERT(1024 == deflater.ctx.hd_table_bufsize_max);
900 rv = nghttp2_hd_deflate_hd_bufs(&deflater, &bufs, nva, 2);
905 CU_ASSERT(2 == deflater.ctx.hd_table.len);
906 CU_ASSERT(1024 == deflater.ctx.hd_table_bufsize_max);
917 nghttp2_hd_deflate_free(&deflater);
920 nghttp2_hd_deflate_init2(&deflater, UINT32_MAX, mem);
924 CU_ASSERT(0 == nghttp2_hd_deflate_change_table_size(&deflater, UINT32_MAX));
926 rv = nghttp2_hd_deflate_hd_bufs(&deflater, &bufs, nva, 2);
930 CU_ASSERT(UINT32_MAX == deflater.ctx.hd_table_bufsize_max);
940 nghttp2_hd_deflate_free(&deflater);
943 nghttp2_hd_deflate_init2(&deflater, 4096, mem);
948 CU_ASSERT(0 == nghttp2_hd_deflate_change_table_size(&deflater, 0));
949 CU_ASSERT(0 == nghttp2_hd_deflate_change_table_size(&deflater, 3000));
951 CU_ASSERT(0 == deflater.min_hd_table_bufsize_max);
952 CU_ASSERT(3000 == deflater.ctx.hd_table_bufsize_max);
954 rv = nghttp2_hd_deflate_hd_bufs(&deflater, &bufs, nva2, 1);
959 CU_ASSERT(3000 == deflater.ctx.hd_table_bufsize_max);
960 CU_ASSERT(UINT32_MAX == deflater.min_hd_table_bufsize_max);
970 nghttp2_hd_deflate_free(&deflater);
975 static void check_deflate_inflate(nghttp2_hd_deflater *deflater,
987 rv = nghttp2_hd_deflate_hd_bufs(deflater, &bufs, nva, nvlen);
1003 nghttp2_hd_deflater deflater;
1142 nghttp2_hd_deflate_init(&deflater, mem);
1145 check_deflate_inflate(&deflater, &inflater, nv1, ARRLEN(nv1), mem);
1146 check_deflate_inflate(&deflater, &inflater, nv2, ARRLEN(nv2), mem);
1147 check_deflate_inflate(&deflater, &inflater, nv3, ARRLEN(nv3), mem);
1148 check_deflate_inflate(&deflater, &inflater, nv4, ARRLEN(nv4), mem);
1149 check_deflate_inflate(&deflater, &inflater, nv5, ARRLEN(nv5), mem);
1150 check_deflate_inflate(&deflater, &inflater, nv6, ARRLEN(nv6), mem);
1151 check_deflate_inflate(&deflater, &inflater, nv7, ARRLEN(nv7), mem);
1152 check_deflate_inflate(&deflater, &inflater, nv8, ARRLEN(nv8), mem);
1153 check_deflate_inflate(&deflater, &inflater, nv9, ARRLEN(nv9), mem);
1154 check_deflate_inflate(&deflater, &inflater, nv10, ARRLEN(nv10), mem);
1157 nghttp2_hd_deflate_free(&deflater);
1161 nghttp2_hd_deflater deflater;
1186 nghttp2_hd_deflate_init(&deflater, mem);
1189 rv = nghttp2_hd_deflate_hd_bufs(&deflater, &bufs, nva, ARRLEN(nva));
1208 nghttp2_hd_deflate_free(&deflater);
1212 nghttp2_hd_deflater deflater;
1221 nghttp2_hd_deflate_init(&deflater, mem);
1223 bound = nghttp2_hd_deflate_bound(&deflater, nva, ARRLEN(nva));
1229 nghttp2_hd_deflate_hd_bufs(&deflater, &bufs, nva, ARRLEN(nva));
1233 bound2 = nghttp2_hd_deflate_bound(&deflater, nva, ARRLEN(nva));
1238 nghttp2_hd_deflate_free(&deflater);
1242 nghttp2_hd_deflater *deflater;
1253 CU_ASSERT(0 == nghttp2_hd_deflate_new(&deflater, 4096));
1256 buflen = nghttp2_hd_deflate_bound(deflater, nva, ARRLEN(nva));
1258 blocklen = nghttp2_hd_deflate_hd(deflater, buf, buflen, nva, ARRLEN(nva));
1270 nghttp2_hd_deflate_del(deflater);
1273 CU_ASSERT(0 == nghttp2_hd_deflate_new(&deflater, 4096));
1275 blocklen = nghttp2_hd_deflate_hd(deflater, buf, (size_t)(blocklen - 1), nva,
1280 nghttp2_hd_deflate_del(deflater);
1284 nghttp2_hd_deflater *deflater;
1307 nghttp2_hd_deflate_new(&deflater, 4096);
1310 buflen = nghttp2_hd_deflate_bound(deflater, nva, ARRLEN(nva));
1317 blocklen = nghttp2_hd_deflate_hd_vec(deflater, vec, 2, nva, ARRLEN(nva));
1332 nghttp2_hd_deflate_del(deflater);
1336 nghttp2_hd_deflate_new(&deflater, 4096);
1339 blocklen = nghttp2_hd_deflate_hd_vec(deflater, NULL, 0, nva, ARRLEN(nva));
1344 nghttp2_hd_deflate_del(deflater);
1352 nghttp2_hd_deflate_new(&deflater, 4096);
1355 blocklen = nghttp2_hd_deflate_hd_vec(deflater, vec, 2, nva, ARRLEN(nva));
1360 nghttp2_hd_deflate_del(deflater);
1363 nghttp2_hd_deflate_new(&deflater, 4096);
1366 buflen = nghttp2_hd_deflate_bound(deflater, nva, ARRLEN(nva));
1373 blocklen = nghttp2_hd_deflate_hd_vec(deflater, vec, 2, nva, ARRLEN(nva));
1387 nghttp2_hd_deflate_del(deflater);
1391 nghttp2_hd_deflate_new(&deflater, 4096);
1394 buflen = nghttp2_hd_deflate_bound(deflater, nva, ARRLEN(nva));
1403 blocklen = nghttp2_hd_deflate_hd_vec(deflater, vec, buflen, nva, ARRLEN(nva));
1417 nghttp2_hd_deflate_del(deflater);