Key Points of Improvement of Huffman Codes

Let me reiterate the key points.

> I would recommend that you reset the discussion, and come up with an
> updated coherent proposal that tries to address the questions that Willy
> asked.

If you have not seen the existing questions, you can ask them again. Willy
Tarreau has left the discussion, but you can ask the same questions as he
did.

## Are the installation costs acceptable?

There are no additional costs specific to this proposal. Thus, there are no
more costs than would be incurred by other methods. If this proposal cannot
be adopted because of cost, then all other methods of improving the
compression ratio of Huffman coding cannot be adopted either.

## What is the cost of the additional Huffman code?

The added Huffman code is so regular that any encoder or decoder using it
should be able to convert it to simple conditionals. Therefore, no new
arrays or trees are required.

## How many bytes are reduced?

While logged in, it reduces 50-100 bytes from the request header of the
Google or Amazon home page. The overall compression ratio of the header is
approximately 2.5%. This is of course a further reduction from HPACK/QPACK.
Reduction occurs mainly in the token value field. Even a single field is
reduced by a very large number of bits. Next is one of them. This is the
cookie value that is sent when I'm logged into Google. On the left is the
number of bits reduced and on the right is the input string. It is secrets,
so the details are omitted.

-606, 'SOCS=...'

## What is the estimate of the overall reduction?

It can be estimated if the ratio of tokens is known since it is
proportional to the amount of tokens.

## Can I see example implementations and tests?

There is a simple implementation and test.

https://github.com/falsandtru/spica/blob/master/src/ascii.xpack.ts
https://github.com/falsandtru/spica/blob/master/src/ascii.xpack.test.ts
https://github.com/falsandtru/spica/blob/master/src/ascii.test.ts

## How do I evaluate the proposal?

Except for the minimal and always necessary cost of improving Huffman
coding, this proposal is a free lunch. It provides a large return for
near-zero additional cost.

Received on Saturday, 9 December 2023 19:55:07 UTC