Pracandy

Features

The Weissman score: a TV metric with real maths

At a glance

HBO's Silicon Valley needed a number to crown a compression algorithm, so two Stanford researchers built one that works.

By Swotboysandy1 min read

Ask AI about this story

Stanford's Packard Electrical Engineering building
Image: Photo: Cullen328, CC BY-SA 3.0, via Wikimedia Commons
On this page

In HBO's Silicon Valley, the start-up Pied Piper wins on the strength of its "Weissman score", a number that rates how well a compression algorithm performs. The show needed the number to sound real. So it asked people who could make it real.

Who made it

The writers approached Tsachy Weissman, a professor of electrical engineering at Stanford, and Vinith Misra, then his PhD student. They wanted one figure that could rank several algorithms and declare a winner. Weissman and Misra designed a score that rewards both how small a file gets and how quickly it gets there.

The formula

The Weissman score is W = α · (r / r̄) · (log T̄ / log T), where:

  • r is your algorithm's compression ratio and T is the time it takes;
  • r̄ and T̄ are the same figures for a standard compressor on the same data, such as FLAC for audio;
  • α is a scaling constant.

Worked example: if your compressor shrinks a file twice as well as the standard one (r / r̄ = 2) and takes the same time, the score is 2α. If it compresses just as well but runs slower, the score drops below α.

Did anyone use it?

Yes, in small ways. IEEE Spectrum reported in 2017 that UC Santa Barbara's Jerry Gibson gave students a final project using the score, and that open-source calculators had appeared online. Weissman said people were using it but tended to hide where it came from. Critics point out its limits: it assumes lossless compression, ignores distortion and does not fix the units of time.

  • Half closed laptop (Unsplash)Image: Photo: Luca Bravo lucabravo, CC0, via Wikimedia Commons

    Features3 min read

    What Is llms.txt, and Does a Small Site Need One?

    What is llms.txt? It is a simple Markdown file placed at your website's root directory that lists specific URLs and brief descriptions, acting as a table…

  • Tack room setup Synths hungImage: Photo: John Athayde, CC BY 2.0, via Wikimedia Commons

    Features2 min read

    How to harden your server against common web exploits

    Run a reverse proxy like Caddy to terminate TLS and filter traffic before it reaches your application.

  • Rob Schnautz's remote officeImage: Photo: Bob the Wikipedian, CC BY-SA 3.0, via Wikimedia Commons

    Features2 min read

    The Best Tools for Solo Founders in 2027

    The best tools for solo founders in 2027 are not defined by hype but by how well they fit a lean, single-operator workflow.