compassd / dcompass

A high-performance programmable DNS component aiming at robustness, speed, and flexibility
GNU General Public License v3.0
283 stars 23 forks source link

droute/matcher-domain: add gzip support #60

Closed honwen closed 3 years ago

honwen commented 3 years ago

first time use rust, code review needed

LEXUGE commented 3 years ago

Also, I am not sure if gz support is necessary, because even it seems like no one is releasing domain lists through gzip format. And in-memory decompressing still puts pressure on embedded machines like router.

honwen commented 3 years ago

Also, I am not sure if gz support is necessary, because even it seems like no one is releasing domain lists through gzip format.

Agree, it a feature for own use, https://github.com/honwen/openwrt-dnsmasq-extra/tree/master/dnsmasq-extra/files/data Or I maintain this feature in my own branch

And in-memory decompressing still puts pressure on embedded machines like router.

need help for improving, refer: https://docs.rs/flate2/1.0.20/flate2/#async-io

LEXUGE commented 3 years ago

I have supported it with the latest commit. Instead of gzip, you can write directly file: a.gz

honwen commented 3 years ago

TKs for Ur patient