Subject: [quicwg/base-drafts] QPACK instruction code points are inconsistent (#1471)

From: afrind <[email-masked]>
Date: Fri, 22 Jun 2018 08:43:33 -0700

HPACK/QPACK can encode N different instructions in N-1 bits.  Both HPACK and the QPACK encoder stream use the same style fore code points - each instruction has either one or zero '1' bits (eg: 1, 01, 001, 0001, 0000).  The QPACK decoder stream and request/push streams however use (0, 10, 11) and (1, 00, 011, 0100, 0101), each of which have instructions with more than one '1'.  The logic to decode the instruction is slightly simpler when using the HPACK form, eg:

```
if byte & shortest_instruction:
  ...
else if byte & next_shortest_instruction:
  ...
else:  # it's the all-zero instruction
  ...
```

This logic doesn't work on the other two streams right now, you need to mask and check for equality.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/1471

---

From: Mike Bishop <[email-masked]>
Date: Fri, 22 Jun 2018 18:35:27 +0000 (UTC)

As discussed in Slack, this would involve changing the request stream code pretty substantially and flipping all the instruction bits on the decoder stream.  However, I think the length of the prefix matters more than what bits are set and not set, so I'm indifferent.  If it makes implementation easier, that's fine.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/1471#issuecomment-399539336

---

From: afrind <[email-masked]>
Date: Tue, 26 Jun 2018 08:22:42 -0700

Closed #1471 via #1472.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/1471#event-1701724204