From the course: Computer Science Principles: Digital Information

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Text compression

Text compression

From the course: Computer Science Principles: Digital Information

Start my 1-month free trial

Text compression

- With larger and larger amounts of content, we need to have ways to store it and transmit it. The larger it gets the more storage it takes to manage it, and more bandwidth is needed to reduce the amount of time it takes to transmit it. You can make the storage and transmission method larger, or you can make the data smaller. Compression is exactly that. It allows data to occupy a smaller amount of space, but at the same time, preserve the original data through compression protocols that encode and decode the compressed file. When we write text we write the words that are part of the message. These words convey the meaning of the sentence. The computer though doesn't necessarily care about the meaning of a sentence, but instead focuses on the encoding of each character as a piece of data. So if you look at this text, it has exactly 1,934 characters, including spaces. We can look for common combinations of characters and swap them out with a unique character. Since there are thousands…

Contents