libknot/packet: compression algorithm improved
The previous compression algorithm does not compress everything it can in cases where there are domain names in the data section of a RR, e.g. when the answer contains bar.example.com CNAME foo.example.com foo.example.com A 192.0.0.2 and foo.example.com was not encountered previously, then the second RR leaves the 'foo' part uncompressed. The improvement resolves some of these cases by comparing the owner of a new RRset to be written with the last written dname instead of QNAME. Also, the effectivity was slightly increased according to benchmarks.
Showing
- src/libknot/dname.c 27 additions, 2 deletionssrc/libknot/dname.c
- src/libknot/dname.h 17 additions, 1 deletionsrc/libknot/dname.h
- src/libknot/packet/compr.c 1 addition, 21 deletionssrc/libknot/packet/compr.c
- src/libknot/packet/pkt.c 28 additions, 9 deletionssrc/libknot/packet/pkt.c
- src/libknot/packet/pkt.h 2 additions, 0 deletionssrc/libknot/packet/pkt.h
- src/libknot/packet/rrset-wire.c 49 additions, 8 deletionssrc/libknot/packet/rrset-wire.c
Loading
Please register or sign in to comment