Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

cs101

Rating
-
Sold
-
Pages
30
Grade
A+
Uploaded on
23-05-2024
Written in
2023/2024

this is the cs 101 notes easily you can prepare in 1 hour . this is the most important point to point clear notes

Institution
Course

Content preview

Data compression is like trying to pack your clothes for a trip. You want to fit as much stuff as
possible in your suitcase, but you don't want to wrinkle or damage anything.

There are two main ways to compress data:

Lossless: This is like folding your clothes neatly to save space. The information is
preserved exactly, but it takes up less space. This is good for things like text files where
you need all the information to be accurate.
Lossy: This is like squeezing your clothes into a tight space. You might lose a few wrinkles
or imperfections, but it saves a lot of space. This is good for things like images and audio
where a little bit of imperfection is okay.

Here are some common data compression techniques:

Run-length encoding: This is like noticing that you have a bunch of the same shirt in a row
and just writing down the number of shirts instead of listing them all one by one.
Frequency-dependent encoding: This is like giving shorter codes to the letters you use
more often in writing, like "e" and "t", and longer codes to letters you use less often, like
"z" and "q".
Differential encoding: This is like noticing that your outfit for today is very similar to
yesterday's outfit, so you just write down the differences instead of packing the whole
thing again.
Dictionary encoding: This is like having a list of common travel essentials and just
referring to the list instead of packing each item individually.

These techniques can be used alone or combined to compress data very efficiently. Just like
you can fold your clothes, then put them in space bags, then squeeze them into a suitcase,
data can be compressed in multiple steps to save as much space as possible.

Compressing Images: Different techniques for different needs

There are three main image compression formats covered in the
passage: GIF, JPEG, and TIFF. They each have pros and cons
depending on what you're using the image for.

GIF (Graphics Interchange Format): This is good for simple
animations and graphics with flat colors like logos or cartoons. It
can only store up to 256 colors, so photos with lots of colors won't
look good. GIF can also be used for images with transparent
backgrounds, which is handy for things like website buttons.
JPEG (Joint Photographic Experts Group): This is the most
common format for photos because it can compress images a lot
(by 10 to 30 times!) without losing too much quality. It works by
focusing on brightness information, which our eyes are more

, sensitive to than color. There is a lossless mode in JPEG, but it
doesn't compress images as much and isn't commonly used.
TIFF (Tagged Image File Format): This format is less common for
compressing images and more for storing photos without
compression, along with extra information like the date it was
taken or camera settings. It does have some compression options,
but they are mainly for black and white text documents and not
widely used for photos.

Here's a table summarizing the key points:

Feature GIF JPEG TIFF

Colors Up to 256 Millions Millions

Good for Animations, Photos Uncompresse
logos d photos

Compression Lower High None (or low
for text)

Transparency Yes No No



Absolutely! Here's a breakdown of how MPEG compresses audio and
video:

MPEG stands for Motion Picture Experts Group, a committee that
develops standards for encoding and compressing audio and
video.
Video Compression Techniques:
Videos are essentially a sequence of pictures. MPEG breaks
down the video into these individual pictures, called frames.
Not all frames are encoded entirely. Only some, called I-frames
(Intra coded frames), are stored whole. These serve as reference
points for other frames.

, The frames between I-frames, called P-frames (Predicted
frames) and B-frames (Bi-directional predicted frames), are
encoded based on their differences from the nearest I-frame or
P-frame. This way, MPEG only stores the changes between
frames, significantly reducing storage space.
Audio Compression Techniques (MP3):
MP3 (MPEG layer 3) is a popular audio compression format that
exploits properties of human hearing to remove imperceptible
sounds.
Temporal masking refers to the fact that the human ear has
difficulty hearing quiet sounds immediately following loud
sounds. MP3 removes quiet sounds following loud ones to save
space without affecting perceived audio quality.
Frequency masking refers to the tendency for louder sounds at
one frequency to mask quieter sounds at nearby frequencies.
MP3 can eliminate quiet sounds near loud ones without
affecting perceived audio quality.

By using these techniques, MPEG and MP3 achieve significant
compression ratios while maintaining good video and audio quality.
This allows for efficient storage and transmission of multimedia
content.

Here's a table summarizing the key points:

Written for

Course

Document information

Uploaded on
May 23, 2024
Number of pages
30
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$7.19
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
rjtv

Get to know the seller

Seller avatar
rjtv Amazon
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions