Lines Matching refs:nv
792 const nghttp3_nv *nv, int32_t token,
803 if (token != p->nv.token ||
804 (token == -1 && (hash != p->hash || !qpack_nv_name_eq(&p->nv, nv))) ||
815 if (qpack_nv_value_eq(&p->nv, nv)) {
820 } else if (!*ppb_match && qpack_nv_value_eq(&p->nv, nv)) {
1005 table_space(ent->nv.name->len, ent->nv.value->len);
1286 * mode for header field |nv|. |token| is a token of header field
1291 const nghttp3_nv *nv, int32_t token) {
1292 if (nv->flags & NGHTTP3_NV_FLAG_NEVER_INDEX) {
1300 if (nv->valuelen < 20) {
1325 if (table_space(nv->namelen, nv->valuelen) >
1376 * qpack_encoder_can_index_nv returns nonzero if header field |nv| can
1381 const nghttp3_nv *nv, uint64_t min_cnt) {
1383 encoder, table_space(nv->namelen, nv->valuelen), min_cnt);
1399 encoder, table_space(ent->nv.name->len, ent->nv.value->len), min_cnt);
1418 const nghttp3_nv *nv, uint64_t base,
1429 token = qpack_lookup_token(nv->name, nv->namelen);
1450 indexing_mode = qpack_encoder_decide_indexing_mode(encoder, nv, token);
1453 sres = nghttp3_qpack_lookup_stable(nv, token, indexing_mode);
1462 dres = nghttp3_qpack_encoder_lookup_dtable(encoder, nv, token, hash,
1496 if (just_index && qpack_encoder_can_index_nv(encoder, nv, *pmin_cnt)) {
1498 (size_t)sres.index, nv);
1503 nv, hash);
1518 encoder, rbuf, (size_t)sres.index, nv);
1524 encoder, nv,
1528 (size_t)dres.index, nv);
1538 nv, hash);
1557 encoder, rbuf, (size_t)dres.index, base, nv);
1560 if (just_index && qpack_encoder_can_index_nv(encoder, nv, *pmin_cnt)) {
1561 rv = nghttp3_qpack_encoder_dtable_literal_add(encoder, nv, token, hash);
1565 rv = nghttp3_qpack_encoder_write_literal_insert(encoder, ebuf, nv);
1579 return nghttp3_qpack_encoder_write_literal(encoder, rbuf, nv);
1583 nghttp3_qpack_lookup_stable(const nghttp3_nv *nv, int32_t token,
1602 if (hdr->value.len == nv->valuelen &&
1603 memeq(hdr->value.base, nv->value, nv->valuelen)) {
1613 nghttp3_qpack_encoder *encoder, const nghttp3_nv *nv, int32_t token,
1620 encoder_qpack_map_find(encoder, &exact_match, &match, &pb_match, nv, token,
1791 * |prefix| is a prefix of variable integer encoding. |nv| is a
1803 const nghttp3_nv *nv) {
1810 hlen = nghttp3_qpack_huffman_encode_count(nv->value, nv->valuelen);
1811 if (hlen < nv->valuelen) {
1815 len += nghttp3_qpack_put_varint_len(nv->valuelen, 7) + nv->valuelen;
1831 p = nghttp3_qpack_huffman_encode(p, nv->value, nv->valuelen);
1834 p = nghttp3_qpack_put_varint(p, nv->valuelen, 7);
1835 if (nv->valuelen) {
1836 p = nghttp3_cpymem(p, nv->value, nv->valuelen);
1849 const nghttp3_nv *nv) {
1851 (uint8_t)(0x50 | ((nv->flags & NGHTTP3_NV_FLAG_NEVER_INDEX) ? 0x20 : 0));
1855 absidx, (nv->flags & NGHTTP3_NV_FLAG_NEVER_INDEX) != 0);
1856 return qpack_encoder_write_indexed_name(encoder, rbuf, fb, absidx, 4, nv);
1861 uint64_t base, const nghttp3_nv *nv) {
1866 absidx, base, (nv->flags & NGHTTP3_NV_FLAG_NEVER_INDEX) != 0);
1870 ((nv->flags & NGHTTP3_NV_FLAG_NEVER_INDEX) ? 0x20 : 0));
1872 base - absidx - 1, 4, nv);
1875 fb = (nv->flags & NGHTTP3_NV_FLAG_NEVER_INDEX) ? 0x08 : 0;
1877 nv);
1883 * variable integer encoding for name length. |nv| is a header field
1894 size_t prefix, const nghttp3_nv *nv) {
1901 nhlen = nghttp3_qpack_huffman_encode_count(nv->name, nv->namelen);
1902 if (nhlen < nv->namelen) {
1906 len = nghttp3_qpack_put_varint_len(nv->namelen, prefix) + nv->namelen;
1909 vhlen = nghttp3_qpack_huffman_encode_count(nv->value, nv->valuelen);
1910 if (vhlen < nv->valuelen) {
1914 len += nghttp3_qpack_put_varint_len(nv->valuelen, 7) + nv->valuelen;
1928 p = nghttp3_qpack_huffman_encode(p, nv->name, nv->namelen);
1930 p = nghttp3_qpack_put_varint(p, nv->namelen, prefix);
1931 if (nv->namelen) {
1932 p = nghttp3_cpymem(p, nv->name, nv->namelen);
1941 p = nghttp3_qpack_huffman_encode(p, nv->value, nv->valuelen);
1943 p = nghttp3_qpack_put_varint(p, nv->valuelen, 7);
1944 if (nv->valuelen) {
1945 p = nghttp3_cpymem(p, nv->value, nv->valuelen);
1958 const nghttp3_nv *nv) {
1960 (uint8_t)(0x20 | ((nv->flags & NGHTTP3_NV_FLAG_NEVER_INDEX) ? 0x10 : 0));
1963 return qpack_encoder_write_literal(encoder, rbuf, fb, 3, nv);
1969 const nghttp3_nv *nv) {
1973 return qpack_encoder_write_indexed_name(encoder, ebuf, 0xc0, absidx, 6, nv);
1979 const nghttp3_nv *nv) {
1984 encoder, ebuf, 0x80, encoder->ctx.next_absidx - absidx - 1, 6, nv);
2016 const nghttp3_nv *nv) {
2018 return qpack_encoder_write_literal(encoder, ebuf, 0x40, 5, nv);
2040 ctx->dtable_size -= table_space(ent->nv.name->len, ent->nv.value->len);
2088 const nghttp3_nv *nv,
2095 rv = nghttp3_rcbuf_new2(&qnv.value, nv->value, nv->valuelen, mem);
2118 const nghttp3_nv *nv,
2125 rv = nghttp3_rcbuf_new2(&qnv.value, nv->value, nv->valuelen, mem);
2132 qnv.name = ent->nv.name;
2133 qnv.token = ent->nv.token;
2155 qnv = ent->nv;
2169 const nghttp3_nv *nv,
2175 rv = nghttp3_rcbuf_new2(&qnv.name, nv->name, nv->namelen, mem);
2180 rv = nghttp3_rcbuf_new2(&qnv.value, nv->value, nv->valuelen, mem);
2218 ent->nv = *qnv;
2224 nghttp3_rcbuf_incref(ent->nv.name);
2225 nghttp3_rcbuf_incref(ent->nv.value);
2229 nghttp3_rcbuf_decref(ent->nv.value);
2230 nghttp3_rcbuf_decref(ent->nv.name);
3087 ctx->dtable_size -= table_space(ent->nv.name->len, ent->nv.value->len);
3141 if (table_space(ent->nv.name->len, decoder->rstate.value->len) >
3146 qnv.name = ent->nv.name;
3148 qnv.token = ent->nv.token;
3171 if (table_space(ent->nv.name->len, ent->nv.value->len) >
3176 qnv = ent->nv;
3251 nghttp3_qpack_nv *nv, uint8_t *pflags,
3397 nghttp3_qpack_decoder_emit_indexed(decoder, sctx, nv);
3409 nghttp3_qpack_decoder_emit_indexed(decoder, sctx, nv);
3582 rv = nghttp3_qpack_decoder_emit_indexed_name(decoder, sctx, nv);
3589 nghttp3_qpack_decoder_emit_literal(decoder, sctx, nv);
3620 rv = nghttp3_qpack_decoder_emit_indexed_name(decoder, sctx, nv);
3627 nghttp3_qpack_decoder_emit_literal(decoder, sctx, nv);
3883 nghttp3_qpack_nv *nv) {
3887 nv->name = (nghttp3_rcbuf *)&shd->name;
3888 nv->value = (nghttp3_rcbuf *)&shd->value;
3889 nv->token = shd->token;
3890 nv->flags = NGHTTP3_NV_FLAG_NONE;
3896 nghttp3_qpack_nv *nv) {
3900 *nv = ent->nv;
3902 nghttp3_rcbuf_incref(nv->name);
3903 nghttp3_rcbuf_incref(nv->value);
3908 nghttp3_qpack_nv *nv) {
3913 qpack_decoder_emit_dynamic_indexed(decoder, sctx, nv);
3915 qpack_decoder_emit_static_indexed(decoder, sctx, nv);
3922 nghttp3_qpack_nv *nv) {
3926 nv->name = (nghttp3_rcbuf *)&shd->name;
3927 nv->value = sctx->rstate.value;
3928 nv->token = shd->token;
3929 nv->flags =
3938 nghttp3_qpack_nv *nv) {
3949 nv->name = ent->nv.name;
3950 nv->value = sctx->rstate.value;
3951 nv->token = ent->nv.token;
3952 nv->flags =
3955 nghttp3_rcbuf_incref(nv->name);
3964 nghttp3_qpack_nv *nv) {
3972 return qpack_decoder_emit_dynamic_indexed_name(decoder, sctx, nv);
3975 qpack_decoder_emit_static_indexed_name(decoder, sctx, nv);
3982 nghttp3_qpack_nv *nv) {
3989 nv->name = sctx->rstate.name;
3990 nv->value = sctx->rstate.value;
3991 nv->token = qpack_lookup_token(nv->name->base, nv->name->len);
3992 nv->flags =