[ STATELESS SHORTENER ]
__ ______ ____ __ __ ________ / / / / __ \/ __ \/ / / / / ___/ _ \ / /_/ / / / / /_/ / /_/ / / / / __/ \__,_/_/ /_/ .___/\__,_(_)_/ \___/ /_/
ARCH: HYBRID MULTI-TIER ENTROPY KERNEL V2.2 MODE: 100% STATELESS
STATUS: BITSTREAM KERNEL ONLINE STORAGE: ZERO-DB / CLIENT-SIDE
[>>] ENTER LONG URL VECTOR:
>
ORIGINAL STREAM ENTROPY SHORTENED LINK NET REDUCTION
- - - -
[ SYSTEM INTERNALS // TECHNICAL SPECIFICATION ]
0 BYTES
Server Storage
65,536
Domain Index
10,000
Frequency Corpus
< 0.01 ms
Decode Latency
[1.0] THE STATELESS PARADIGM & ZERO-STORAGE INVARIANCE

Conventional URL shorteners (e.g. bit.ly, tinyurl.com, t.co) operate as stateful centralized key-value brokers. When a link is shortened, the server generates a random 6-to-8 character key, writes an entry into an SQL or Redis database (id -> long_url), and returns the key.

This architecture creates profound vulnerabilities: links break when services shut down (“link rot”), servers incur ongoing hosting costs, centralized operators can track and profile click activity, and single database outages take down millions of redirects simultaneously.

unpu.re replaces stateful storage with pure information theory. The short code is not an ID or pointer; it is the fully serialized, entropy-compressed payload of the destination URL itself. The compression function f(url) -> token and decompression function f⁻¹(token) -> url are purely mathematical and deterministic. Zero bytes of database storage exist, meaning links never expire and can be decoded offline indefinitely.

[2.0] BITSTREAM ENTROPY FRAMING & MULTI-TIER DICTIONARY CODEC (V2.3)

General-purpose compression algorithms (gzip, brotli, zstd) fail on short strings (30–80 bytes) because their framing headers, checksums, and dynamic Huffman trees produce 40–70 bytes of overhead, often resulting in negative compression.

unpu.re bypasses byte boundaries using a custom fractional bitstream compiler. Bits are packed sequentially with zero alignment padding:

+----------------------------------------------------------------------------------------------------+ | UNPU.RE V2.3 BITSTREAM PACKET LAYOUT | +---------+-----------------+-----------------------+------------------------------------------------+ | MODE | SCHEME (2 bits) | HOST ROUTING (1 - 20b)| MULTI-TIER TOKEN STREAM (4b - 22b per element) | | (1 bit) | 00: https://www | 0: 65k Dict Domain | DATE: Dedicated Calendar Mode (22 bits) | | 0: Comp | 01: http://www | 10: Platform Subdomain| T0: High-freq delimiters & routes (6 bits) | | 1: Id | 10: https:// | 11: Custom Hostname | T1: 512-Slot News/Web Tokens & Query (11 bits) | | | 11: http:// | | T2: 16k Vocab (Multi-lingual + CamelCase) (18b)| | | | | T3: Nibble-Packed Hex Mode (4 bits/char) | | | | | T4: Decimal BCD Digit Mode (4 bits/digit) | | | | | T5: 5-Bit Slug Alphabet Run Mode (5 bits/char) | | | | | T6: Byte Run & Single Byte Fallback (8b/16b) | +---------+-----------------+-----------------------+------------------------------------------------+
  • Mode Bit (1 bit): Bit 0 indicates the compressed multi-tier bitstream. If an uncompressible payload is detected where compressed bits exceed raw 8-bit octets, the encoder automatically invokes Mode 1 (Identity Escape Floor), guaranteeing zero expansion.
  • Scheme Framing Header (2 bits): Encodes the URL protocol:
    00 = https://www. | 01 = http://www. | 10 = https:// | 11 = http://
  • Host Routing (Top 65k Domains & Platform Subdomains):
    • 00 + 16-bit unsigned integer: Domain matches top 65,536 Tranco telemetry index, followed by trailing path tokens.
    • 01 + 16-bit unsigned integer: Domain matches dictionary, terminating bare domain (e.g. https://google.com collapses into 2 bits + 2 bits + 16 bits = 20 bits \(\approx\) 4 Base64 characters).
    • 10 + 4-bit Platform ID: Multi-tenant developer/blog platforms (github.io, wordpress.com, substack.com, medium.com, pages.dev, vercel.app, etc.), followed by subdomain tokens.
    • 11 + host tokens: Generic custom domain fallback.
  • Path Token Stream (Multi-Tier Entropy Hierarchy):
    • Dedicated Calendar Date Mode (22 bits): Prefix 11101 + 7-bit Year offset (1970–2097) + 4-bit Month (1–12) + 5-bit Day (1–31) + 1-bit Trailing Slash flag. Compresses any /YYYY/MM/DD/ or /YYYY/MM/DD timestamp sequence (e.g. /2026/09/19/) into exactly 22 bits instead of 96 raw bits, saving ~77% on news date paths.
    • Tier 0 (6 bits): Prefix 0 + 5-bit index (32 high-frequency routes, connectives, and query separators such as /blog/, /api/v1/, -to-, &id=, /, -). Slot 31 is the End-of-Stream (EOS) delimiter.
    • Tier 1 (11 bits): Prefix 10 + 9-bit index (512 common web tokens, modern TLDs like .io, .ai, universal news desks like /world/europe/, politics/, business/, European/Scandinavian categories like /internationalt/, /politik/, /danmark/, news connectors like --og-, -og-, --, news entities like greenland-, trump-, security-, deal-, what-to-know, and query parameters like .html?searchResultPosition=1).
    • Tier 2 (18 bits): 16,384 frequency-ranked words ($2^14$) combining global English vocabulary with high-frequency Danish, Nordic, and European news vocabulary (including ASCII transliterations like aa, oe, ae). Supports CamelCase Segmentation (e.g. searchResultPosition → search + Result + Position), Compound Subword Splitting, and suffix -s handling.
    • Tier 3 (Nibble-Packed Hex Mode - 4 bits/char): Prefix 11110 + 6-bit length + 1-bit case. Packs 2 hexadecimal characters per byte into 4-bit nibbles.
    • Tier 4 (Decimal BCD Digit Mode - 4 bits/digit): Prefix 111110 + 6-bit length. Packs continuous decimal digits (dates, timestamps, IDs) into 4-bit Binary Coded Decimal.
    • Tier 5 (5-Bit Slug Alphabet Run Mode - 5 bits/char): Prefix 1111110 + 6-bit length. Packs unindexed URL slug characters (a-z, -, _, ., ~, %) at only 5 bits per character (0.83 Base64 chars per byte), mathematically preventing unindexed headlines and slugs from ever expanding.
    • Tier 6 (Byte Run Mode & Single Byte Fallback): Prefix 11111110 + 6-bit length for literal ASCII byte runs (8 bits/char), and Prefix 11111111 + 8-bit byte for isolated symbols.
  • Radix-64 URL-Safe Serialization: The variable bitstream is packed into 8-bit octets and serialized using RFC 4648 URL-safe Base64 ([A-Za-z0-9_-]), omitting trailing = padding characters for clean, typeable paths.
[3.0] GITHUB PAGES ZERO-SERVER 404 ROUTING LIFECYCLE

GitHub Pages is an immutable static CDN without server-side rewrite capabilities (no try_files, PHP, or Cloudflare Workers). Under normal operations, navigating to a non-existent path returns a 404 status.

unpu.re turns this limitation into a client-side routing bus:

[CLIENT] ---> HTTP GET https://unpu.re/hKTAqfQqB8A | [GITHUB PAGES CDN] | +-----------+-----------+ | Path exists on disk? | | NO (Dynamic token) | +-----------------------+ | Serves repo custom /404.html (HTTP 404) | [BROWSER PARSING] | Synchronous <head> script executes BEFORE layout or DOM render | extractCode() reads window.location.pathname -> "hKTAqfQqB8A" | decodeUrl() decompresses bitstream in CPU registers (< 0.01 ms) | window.location.replace("https://example.com/blog/lorem-ipsum") | [INSTANT CLIENT REDIRECTION]
  • Pre-Render Head Execution: The decompression decoder runs synchronously inside the <head> before any stylesheet parsing, image fetching, or DOM tree rendering occurs. Redirection takes place in under 5 milliseconds.
  • History Preservation: Calling window.location.replace() rather than window.location.href overwrites the 404 entry in the browser session history. Pressing the “Back” button returns the user cleanly to their previous page without trapping them in a redirect loop.
  • Dual Routing Topology: The system supports both clean paths (https://unpu.re/<code> via 404.html) and fragment identifiers (https://unpu.re/#<code> via index.html) seamlessly.
[4.0] DECOMPRESSION BENCHMARKS & COMPLEXITY ANALYSIS

Because the 65,536-domain array and 16,384-word vocabulary are pre-sorted lexicographically, domain resolution operates in \(O(\log_2 N)\) time, word lookup in \(O(1)\) time, and bitstream deserialization in linear \(O(L)\) time with respect to the short code length:

METRIC CENTRALIZED SHORTENERS GENERIC GZIP UNPU.RE HYBRID KERNEL V2.3
Server Database Required (MySQL/Redis) N/A 0 Bytes (Stateless)
40-Char URL Output ~22 chars (stateful ID) 65+ bytes (header bloat) 11 chars (-72.5%)
96-Char NYT News URL (Date + Slug) ~22 chars (stateful ID) 110+ bytes (header bloat) 18 chars (-64.6% net)
189-Char Nordic News URL (Berlingske) ~22 chars (stateful ID) 160+ bytes (header bloat) 67 chars (-56.1% net)
Decode Latency 20 - 150 ms (DB roundtrip) 0.5 - 2 ms < 0.01 ms (In-Memory)
Link Longevity Vulnerable to shutdown/rot N/A Permanent & Immutable
[ OK: COPIED TO CLIPBOARD ]