DNS pointer compression: how responses avoid repeating domain names
cneuralnetwork · x · 2026-10-22
In the final part of his hand-rolled DNS resolver thread, @cneuralnetwork covers parsing responses and DNS pointer compression: if the top two bits of a label byte are 11, the remaining 14 bits across two bytes encode an offset into the DNS message, so servers point to earlier occurrences instead of repeating names.
He wraps up: encode a name, build a query, send over UDP, parse the answer, extract the IP. Production resolvers also need retries, TCP fallback, validation, caching, and security. He plans to build more protocols from scratch in C.
Related event: Developer Builds a Mini DNS Resolver in C to Explain Domain Resolution(3 posts)→
More from coding & agent
- One-shot RL repro: training Qwen3.5-4B to paint watercolour flowers with a judge model — charles_irl · 2026-10-22
- Open-source Claude Duet alternative Open-Duet hits 5.9k stars on launch day — matchaman11 · 2026-10-22
- LGWM: A World Model That Verifies GUI Agent Transitions and Detects Hijacked Screens — Jiaming Zhang · 2026-10-22
- Tracing AI agents with OpenTelemetry: costs, P95 latency, and gaps in one pipeline — silksong_when · 2026-10-22
- New pattern: sync X bookmark folders to agents for intent-driven auto-pilot jobs — vincent_koc · 2026-10-22
- Towards AI builds writing benchmark: 4 LLM judges, 1000 human A/B tests on AI slop — AI Engineer · 2026-10-22