Follow

Let's say we want to take patterns of two characters and replace them with a single-byte flag to compress a code file of any language.

With about 95 unique symbols in total, we use the combination formula to get the total number of possible tokens: C = 95! / ( 2!(95-2)! ) = 4,465. Divide that by 255 -- the maximum number of unique int values a single byte can store -- and we have the worst compression algorithm I've ever designed.

Thanks for coming to my TED talk.

· · Web · 0 · 0 · 0
Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!