Subject: [quicwg/base-drafts] Alternative largest reference algorithm (#1904)

From: Martin Thomson <[email-masked]>
Date: Wed, 24 Oct 2018 15:50:12 -0700

@afrind suggested that the shorter algorithm I used for largest reference decoding might be better than the one in the doc.

This is the relevant piece of the python script used to test this (which we might also consider putting in the repo).

``` python
max_entries = int(math.floor(table_size / 32))
full_range = 2 * max_entries
if wire_lr == 0:
    lr = 0
else:
    max_value = decoder_base + max_entries
    rounded = math.floor(max_value / full_range) * full_range
    lr = rounded + wire_lr - 1
    if lr > max_value and lr >= full_range:
        lr -= full_range
```

Here until the QPACK reorg finishes.

-- 
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/1904