How Computers Compress Text: Huffman Coding and Huffman Trees

preview_player
Показать описание
Computers store text (or, at least, English text) as eight bits per character. There are plenty of more efficient ways that could work: so why don't we use them? And how can we fit more text into less space? Let's talk about Huffman coding, Huffman trees, and Will Smith.

And thanks to my proofreading team!

(you can find contact details and social links there too)

Рекомендации по теме
Комментарии
Автор

This is the last of the three trial Basics videos! This pushed my quick-explanation skills to the limit, but I figure that "slow down the video and replay if necessary" is better than "let people get bored"...

TomScottGo
Автор

Would love to learn more about compression! This was fascinating :-)

xisumavoid
Автор

Dang, that last line got me. I want a series on more than just the basics now!

WAYAWAYWithAsh
Автор

It's amazing how every video that Tom puts out always has an incredible amount of attention to detail. Take for instance the increase in video compression when he talks about it (0:43), him saying "worms" instead of "words" when talking about (0:52) lossy text compression, and the fact that at (4:40) he does his gestures mirrored so it is our left and right and not his left and right. On top of that he does it all in one take. I'm always amazed when a new episode comes out.

TUTAMKHAMON
Автор

3:00 God how I love the square sneaking of the screen

SuperManitu
Автор

Tom if you keep this up people will realize its not magic. If I have to stop wearing my wizards hat to work Ill spell you so hard.

grassyclimer
Автор

I've worked with various compression algorithms derived from Huffman and this is the best description of it I've seen.

hayleyxyz
Автор

"... or you'll send the wrong worms" damn Matt, that joke was awful!

HarryNewbury
Автор

During my encoding class I had to write a program that compresses files with huffman coding. As I was turning back my program the professor asked me:
-Where is the source code?
-Oh here, you just have to decompress it with my program.

Mikomen
Автор

literally better than my entire CS class in 6 mins 30 secs. thanks Tom!

ChaseCarlson
Автор

I've been binge watching your videos for the last few days procrastinating on my homework. Now my CS class has a question on a Huffman tree, and I end right back up here. Thank you, Tom. You made it super easy.

MasterJoJYTP
Автор

Tom Scott, you, sir, are a genius. Nobody has ever been able to explain something like this to me in such a simple fashion, I actually understand this now, and I could decode a file by hand with a Huffman tree now just from what I learned in your video.

MickeyD
Автор

Yo, the YT algorithm is giving me a Tom Scott renaissance right now and it's all so good. Love this guy!

ceruchi
Автор

Everyone's talking about Tom sending the wrong worms, but there's precious little talk about the video quality going drastically downwards as he talked about video/images being lossy compression right before that.

steatopigeon
Автор

I never thought that Wild Wild West would ever be used to such a profound effect. Well done, Tom.

lawrencecalablaster
Автор

This is amazing. I am a CS student, and needed to implement a huffman algorithm as an assignment. There's an explanation in the assignment about the huffman algorithm, but it's really poor.

Having watched this video before, I came back to see if it could explain the algorithm, and Tom nails it. The algorithm is explained well in a way that both the layman and the experienced can understand. Tom is an excellent communicator!

learningCodingWithMe
Автор

THANK YOU TOM SCOTT!! I have wondered how compression like this worked for the better part of a decade, and I've even put a decent amount of time into researching it, but it never clicked until this video. You have the best content on this entire platform, both in subject matter and quality.

ImSquiggs
Автор

Wow! I can't believe you just explained something that you would learn at a university lecture, but in a way that was so thoroughly entertaining!

connorbunch
Автор

Basics videos are great. You're a good communicator, and it's fantastic for children doing computer science at GCSE.

christopherharrington
Автор

Studying for a computer science exam about datastuctures and I am very glad that I can watch a Tom Scott video in my study session

xdxnisx