DEV Community

Surya Prakash Sahu
Surya Prakash Sahu

Posted on

Data Compression: Under 256 characters

This is a submission for DEV Computer Science Challenge v24.06.12: One Byte Explainer.

Explainer

Data compression is reducing bits needed to represent data.
S:she sees sea-needs 80bits(8bits/char).

If

  • only 3 words(she,sees,sea) exist, S:"00 01 10"-6bits
  • all alphabets exist & S is only sentence, S:"1 001 01 1 01 01 1 1 01 000"(Huffman coding)-18bits.

Additional Context

In computer science and information theory, a Huffman code is a particular type of optimal prefix code that is commonly used for lossless data compression. The process of finding or using such a code is Huffman coding, an algorithm developed by David A. Huffman while he was a Sc.D. student at MIT, and published in the 1952 paper "A Method for the Construction of Minimum-Redundancy Codes".

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay