d47b958fc38e4acdf0fc2283947f94e990137cff
ha.mr
Compresses links and optimizes QR codes entirely in the browser, without a back-end database.
How
- 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. - Second-level and top-level domains are matched against a Huffman-coded dictionary of the most common websites and TLDs.
- The rest of the link is split into parts, and each segment is either fitted to a predefined character set, or Huffman coded.
- 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.) - For QR codes, the output uses the alphanumeric character set to remove overhead compared to other QR code generators.
Acknowledgements
Languages
HTML
52.2%
JavaScript
46.8%
Dockerfile
1%