bind9/lib/dns/include
Tony Finch 45b2d8938b
Simplify and speed up DNS name compression
All we need for compression is a very small hash set of compression
offsets, because most of the information we need (the previously added
names) can be found in the message using the compression offsets.

This change combines dns_compress_find() and dns_compress_add() into
one function dns_compress_name() that both finds any existing suffix,
and adds any new prefix to the table. The old split led to performance
problems caused by duplicate names in the compression context.

Compression contexts are now either small or large, which the caller
chooses depending on the expected size of the message. There is no
dynamic resizing.

There is a behaviour change: compression now acts on all the labels in
each name, instead of just the last few.

A small benchmark suggests this is about 2x faster.
2022-10-17 08:45:44 +02:00
..
dns Simplify and speed up DNS name compression 2022-10-17 08:45:44 +02:00
dst Replace alg_totext with dst_hmac_algorithm_totext 2022-09-27 16:54:39 +02:00
.clang-format Add separate .clang-format files for headers 2020-02-14 09:31:05 +01:00