From 0f780bfdbd85c2c7f1093d43a3a50390d2d2dbff Mon Sep 17 00:00:00 2001 From: p2r3 <41925384+p2r3@users.noreply.github.com> Date: Sun, 9 Aug 2026 13:32:30 +0300 Subject: [PATCH] update readme --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a899c06..cf95580 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,12 @@ # ha.mr -Static URL compressor and QR code optimizer +Compresses links and optimizes QR codes entirely in the browser, without a back-end database. + +## How +1. Common parts of the link (e.g. protocol, `www.` prefix, `index.html`) are manually detected and reduced to individual bits. If present, the port is encoded as a raw numeric value. +2. Second-level and top-level domains are matched against a Huffman-coded dictionary of the most common websites and TLDs. +3. The rest of the link is split into parts, and each segment is either fitted to a predefined character set, or Huffman coded. +4. For links, the output is encoded in the full character set of a URL. (I've been informed that square brackets `[]` are not supposed to be a part of this set, but it's too late to change that now.) +5. For QR codes, the output uses the alphanumeric character set to remove overhead compared to other QR code generators. + +## Acknowledgements +- https://www.npmjs.com/package/qrcode