SlideShare a Scribd company logo
Data CompressionData Compression
09eskit02109eskit021
ARVIND KHILERIARVIND KHILERI
Why Data Compression?Why Data Compression?
Make optimal use of limited storage
space
Save time and help to optimize resources
 If compression and decompression are done in I/O processor, less time is
required to move data to or from storage subsystem, freeing I/O bus for
other work
 In sending data over communication line: less time to transmit and less
storage to host
Data Compression- EntropyData Compression- Entropy
Entropy is the measure of information content
in a message.
 Messages with higher entropy carry more information than
messages with lower entropy.
How to determine the entropy
 Find the probability p(x) of symbol x in the message
 The entropy H(x) of the symbol x is:
H(x) = - p(x) • log2p(x)
The average entropy over the entire message is
the sum of the entropy of all n symbols in the
message
Data Compression MethodsData Compression Methods
Data compression is about storing and sending
a smaller number of bits.
There’re two major categories for methods to
compress data: lossless and lossy methods
Lossless Compression MethodsLossless Compression Methods
In lossless methods, original data and the data
after compression and decompression are
exactly the same.
Redundant data is removed in compression and
added during decompression.
Lossless methods are used when we can’t
afford to lose any data: legal and medical
documents, computer programs.
Run-length encodingRun-length encoding
 Simplest method of compression.
 How: replace consecutive repeating occurrences of a symbol by 1
occurrence of the symbol itself, then followed by the number of
occurrences.
 The method can be more efficient if the data uses only 2 symbols
(0s and 1s) in bit patterns and 1 symbol is more frequent than
another.
Huffman CodingHuffman Coding
 Assign fewer bits to symbols that occur more
frequently and more bits to symbols appear less often.
 There’s no unique Huffman code and every Huffman
code has the same average code length.
 Algorithm:
a. Make a leaf node for each code symbol
Add the generation probability of each symbol to the leaf node
a. Take the two leaf nodes with the smallest probability and connect
them into a new node
Add 1 or 0 to each of the two branches
The probability of the new node is the sum of the probabilities of
the two connecting nodes
a. If there is only one node left, the code construction is completed. If
not, go back to (2)
Huffman CodingHuffman Coding
 Example
Huffman CodingHuffman Coding
 Encoding
 Decoding
Lempel Ziv EncodingLempel Ziv Encoding
It is dictionary-based encoding
Basic idea:
 Create a dictionary(a table) of strings used during
communication.
 If both sender and receiver have a copy of the
dictionary, then previously-encountered strings can
be substituted by their index in the dictionary.
Lempel Ziv CompressionLempel Ziv Compression
Have 2 phases:
 Building an indexed dictionary
 Compressing a string of symbols
• Algorithm:
 Extract the smallest substring that cannot be found
in the remaining uncompressed string.
 Store that substring in the dictionary as a new
entry and assign it an index value
 Substring is replaced with the index found in the
dictionary
 Insert the index and the last character of the
substring into the compressed string
Lempel Ziv CompressionLempel Ziv Compression
 Compression
example:
Lempel Ziv DecompressionLempel Ziv Decompression
 It’s just the inverse
of compression process
Lossy Compression MethodsLossy Compression Methods
Used for compressing images and video files
(our eyes cannot distinguish subtle changes, so
lossy data is acceptable).
These methods are cheaper, less time and
space.
Several methods:
 JPEG: compress pictures and graphics
 MPEG: compress video
 MP3: compress audio
JPEG EncodingJPEG Encoding
Used to compress pictures and graphics.
In JPEG, a grayscale picture is divided into 8x8
pixel blocks to decrease the number of
calculations.
Basic idea:
 Change the picture into a linear (vector) sets of numbers that
reveals the redundancies.
 The redundancies is then removed by one of lossless
compression methods.
JPEG Encoding- DCTJPEG Encoding- DCT
 DCT: Discrete Concise Transform
 DCT transforms the 64 values in 8x8 pixel block in a
way that the relative relationships between pixels are
kept but the redundancies are revealed.
 Example:
A gradient grayscale
Quantization & CompressionQuantization & Compression
Quantization:
 After T table is created, the values are quantized to reduce
the number of bits needed for encoding.
 Quantization divides the number of bits by a constant, then
drops the fraction. This is done to optimize the number of
bits and the number of 0s for each particular application.
• Compression:
 Quantized values are read from the table and redundant 0s
are removed.
 To cluster the 0s together, the table is read diagonally in an
zigzag fashion. The reason is if the table doesn’t have fine
changes, the bottom right corner of the table is all 0s.
 JPEG usually uses lossless run-length encoding at the
compression phase.
JPEG EncodingJPEG Encoding
MPEG EncodingMPEG Encoding
Used to compress video.
Basic idea:
 Each video is a rapid sequence of a set of frames.
Each frame is a spatial combination of pixels, or a
picture.
 Compressing video =
spatially compressing each frame
+
temporally compressing a set of frames.
MPEG EncodingMPEG Encoding
Spatial Compression
 Each frame is spatially compressed by JPEG.
• Temporal Compression
 Redundant frames are removed.
 For example, in a static scene in which someone is talking,
most frames are the same except for the segment around the
speaker’s lips, which changes from one frame to the next.
Audio CompressionAudio Compression
Used for speech or music
 Speech: compress a 64 kHz digitized signal
 Music: compress a 1.411 MHz signal
• Two categories of techniques:
 Predictive encoding
 Perceptual encoding
Audio EncodingAudio Encoding
Predictive Encoding
 Only the differences between samples are encoded,
not the whole sample values.
 Several standards: GSM (13 kbps), G.729 (8 kbps),
and G.723.3 (6.4 or 5.3 kbps)
• Perceptual Encoding: MP3
 CD-quality audio needs at least 1.411 Mbps and
cannot be sent over the Internet without
compression.
 MP3 (MPEG audio layer 3) uses perceptual
encoding technique to compress audio.
ReferencesReferences
http://www.csie.kuas.edu.tw/course/cs/english/ch-1
CS157B-Lecture 19 by Professor Lee
http://cs.sjsu.edu/~lee/cs157b/cs157b.html
“The essentials of computer organization
and architecture” by Linda Null and Julia
Nobur.
Data CompressionData Compression
QUESTION?

More Related Content

What's hot

Data compression
Data compressionData compression
Data compression
Sir Issac Newton COllege
 
data compression.
data compression.data compression.
data compression.
hasan sarker
 
image compression ppt
image compression pptimage compression ppt
image compression ppt
Shivangi Saxena
 
Compression techniques
Compression techniquesCompression techniques
Compression techniques
m_divya_bharathi
 
Data compression
Data  compressionData  compression
Data compression
Ashutosh Kawadkar
 
Data compression
Data compressionData compression
Data compression
Chaitanya Belhekar
 
Data compression techniques
Data compression techniquesData compression techniques
Data compression techniques
Deep Bhatt
 
lecture on data compression
lecture on data compressionlecture on data compression
lecture on data compression
Dr Rajiv Srivastava
 
Huffman Coding
Huffman CodingHuffman Coding
Huffman Coding
anithabalaprabhu
 
JPEG
JPEGJPEG
Introduction to Image Compression
Introduction to Image CompressionIntroduction to Image Compression
Introduction to Image Compression
Kalyan Acharjya
 
Data compression
Data compressionData compression
Data compression
Sherif Abdelfattah
 
JPEG Image Compression
JPEG Image CompressionJPEG Image Compression
JPEG Image Compression
Aishwarya K. M.
 
Lossless Compression
Lossless CompressionLossless Compression
Lossless Compression
Puchpa Oks
 
Compression: Images (JPEG)
Compression: Images (JPEG)Compression: Images (JPEG)
Compression: Images (JPEG)
danishrafiq
 
Video Compression Basics
Video Compression BasicsVideo Compression Basics
Video Compression Basics
Sanjiv Malik
 
Text compression
Text compressionText compression
Text compression
Sammer Qader
 
Digital Audio in Multimedia
Digital Audio in MultimediaDigital Audio in Multimedia
Digital Audio in Multimedia
lalithambiga kamaraj
 
Digital Image Processing - Image Compression
Digital Image Processing - Image CompressionDigital Image Processing - Image Compression
Digital Image Processing - Image Compression
Mathankumar S
 
Audio compression
Audio compressionAudio compression
Audio compression
priyanka pandey
 

What's hot (20)

Data compression
Data compressionData compression
Data compression
 
data compression.
data compression.data compression.
data compression.
 
image compression ppt
image compression pptimage compression ppt
image compression ppt
 
Compression techniques
Compression techniquesCompression techniques
Compression techniques
 
Data compression
Data  compressionData  compression
Data compression
 
Data compression
Data compressionData compression
Data compression
 
Data compression techniques
Data compression techniquesData compression techniques
Data compression techniques
 
lecture on data compression
lecture on data compressionlecture on data compression
lecture on data compression
 
Huffman Coding
Huffman CodingHuffman Coding
Huffman Coding
 
JPEG
JPEGJPEG
JPEG
 
Introduction to Image Compression
Introduction to Image CompressionIntroduction to Image Compression
Introduction to Image Compression
 
Data compression
Data compressionData compression
Data compression
 
JPEG Image Compression
JPEG Image CompressionJPEG Image Compression
JPEG Image Compression
 
Lossless Compression
Lossless CompressionLossless Compression
Lossless Compression
 
Compression: Images (JPEG)
Compression: Images (JPEG)Compression: Images (JPEG)
Compression: Images (JPEG)
 
Video Compression Basics
Video Compression BasicsVideo Compression Basics
Video Compression Basics
 
Text compression
Text compressionText compression
Text compression
 
Digital Audio in Multimedia
Digital Audio in MultimediaDigital Audio in Multimedia
Digital Audio in Multimedia
 
Digital Image Processing - Image Compression
Digital Image Processing - Image CompressionDigital Image Processing - Image Compression
Digital Image Processing - Image Compression
 
Audio compression
Audio compressionAudio compression
Audio compression
 

Viewers also liked

Data compression introduction
Data compression introductionData compression introduction
Data compression introduction
Rahul Khanwani
 
Compression
CompressionCompression
Compression
Ashish Kumar
 
Vaxd brought to you by the Back Pain Institute of Dallas
Vaxd brought to you by the Back Pain Institute of DallasVaxd brought to you by the Back Pain Institute of Dallas
Vaxd brought to you by the Back Pain Institute of Dallas
Back Pain Institute of Dallas
 
Computer software 2
Computer software 2Computer software 2
Computer software 2
Suresh Kumar
 
Sindrome de Compresion Vertebral, Medular y Radicular
Sindrome de Compresion Vertebral, Medular y RadicularSindrome de Compresion Vertebral, Medular y Radicular
Sindrome de Compresion Vertebral, Medular y Radicular
Erilien Cherilus
 
Cjb0912010 lz algorithms
Cjb0912010 lz algorithmsCjb0912010 lz algorithms
Cjb0912010 lz algorithms
RAJAN ST
 
Data Compression Project Presentation
Data Compression Project PresentationData Compression Project Presentation
Data Compression Project Presentation
Myuran Kanga, MS, MBA
 
2013 OHSUG - Clinical Data Warehouse Implementation
2013 OHSUG - Clinical Data Warehouse Implementation2013 OHSUG - Clinical Data Warehouse Implementation
2013 OHSUG - Clinical Data Warehouse Implementation
Perficient
 
Source coding
Source codingSource coding
Source coding
MOHIT KUMAR
 
B) Computer Basics
B) Computer BasicsB) Computer Basics
B) Computer Basics
remotestaffdesignsolution
 
TEST EXECUTION AND REPORTING
TEST EXECUTION AND REPORTINGTEST EXECUTION AND REPORTING
TEST EXECUTION AND REPORTING
suhasreddy1
 
Lzw compression
Lzw compressionLzw compression
Lzw compression
Meghna Singh
 
Test Life Cycle - Manual Testing Concept.
Test Life Cycle - Manual Testing Concept.Test Life Cycle - Manual Testing Concept.
Test Life Cycle - Manual Testing Concept.
guestf9bc
 
Datacube
DatacubeDatacube
Datacube
man2sandsce17
 
An introduction of cloud storage
An introduction of cloud storage An introduction of cloud storage
An introduction of cloud storage
Wenbin Zhao
 
Wireless sensor network security issues
Wireless sensor network security issuesWireless sensor network security issues
Wireless sensor network security issues
Maha Saad
 
Text compression in LZW and Flate
Text compression in LZW and FlateText compression in LZW and Flate
Text compression in LZW and Flate
Subeer Rangra
 
Appraisal (Self Assessment, Peer Assessment, 360 Degree Feedback)
Appraisal (Self Assessment, Peer Assessment, 360 Degree Feedback)Appraisal (Self Assessment, Peer Assessment, 360 Degree Feedback)
Appraisal (Self Assessment, Peer Assessment, 360 Degree Feedback)
Project Student
 
Jpeg compression
Jpeg compressionJpeg compression
Jpeg compression
Hossain Md Shakhawat
 
Cloud storage slides
Cloud storage slidesCloud storage slides
Cloud storage slides
Evan Powell
 

Viewers also liked (20)

Data compression introduction
Data compression introductionData compression introduction
Data compression introduction
 
Compression
CompressionCompression
Compression
 
Vaxd brought to you by the Back Pain Institute of Dallas
Vaxd brought to you by the Back Pain Institute of DallasVaxd brought to you by the Back Pain Institute of Dallas
Vaxd brought to you by the Back Pain Institute of Dallas
 
Computer software 2
Computer software 2Computer software 2
Computer software 2
 
Sindrome de Compresion Vertebral, Medular y Radicular
Sindrome de Compresion Vertebral, Medular y RadicularSindrome de Compresion Vertebral, Medular y Radicular
Sindrome de Compresion Vertebral, Medular y Radicular
 
Cjb0912010 lz algorithms
Cjb0912010 lz algorithmsCjb0912010 lz algorithms
Cjb0912010 lz algorithms
 
Data Compression Project Presentation
Data Compression Project PresentationData Compression Project Presentation
Data Compression Project Presentation
 
2013 OHSUG - Clinical Data Warehouse Implementation
2013 OHSUG - Clinical Data Warehouse Implementation2013 OHSUG - Clinical Data Warehouse Implementation
2013 OHSUG - Clinical Data Warehouse Implementation
 
Source coding
Source codingSource coding
Source coding
 
B) Computer Basics
B) Computer BasicsB) Computer Basics
B) Computer Basics
 
TEST EXECUTION AND REPORTING
TEST EXECUTION AND REPORTINGTEST EXECUTION AND REPORTING
TEST EXECUTION AND REPORTING
 
Lzw compression
Lzw compressionLzw compression
Lzw compression
 
Test Life Cycle - Manual Testing Concept.
Test Life Cycle - Manual Testing Concept.Test Life Cycle - Manual Testing Concept.
Test Life Cycle - Manual Testing Concept.
 
Datacube
DatacubeDatacube
Datacube
 
An introduction of cloud storage
An introduction of cloud storage An introduction of cloud storage
An introduction of cloud storage
 
Wireless sensor network security issues
Wireless sensor network security issuesWireless sensor network security issues
Wireless sensor network security issues
 
Text compression in LZW and Flate
Text compression in LZW and FlateText compression in LZW and Flate
Text compression in LZW and Flate
 
Appraisal (Self Assessment, Peer Assessment, 360 Degree Feedback)
Appraisal (Self Assessment, Peer Assessment, 360 Degree Feedback)Appraisal (Self Assessment, Peer Assessment, 360 Degree Feedback)
Appraisal (Self Assessment, Peer Assessment, 360 Degree Feedback)
 
Jpeg compression
Jpeg compressionJpeg compression
Jpeg compression
 
Cloud storage slides
Cloud storage slidesCloud storage slides
Cloud storage slides
 

Similar to Data compression

Data Compression
Data CompressionData Compression
Data Compression
Shubham Bammi
 
2019188026 Data Compression (1) (1).pdf
2019188026 Data Compression  (1) (1).pdf2019188026 Data Compression  (1) (1).pdf
2019188026 Data Compression (1) (1).pdf
AbinayaC11
 
111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt
AllamJayaPrakash
 
111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt
AllamJayaPrakash
 
data compression technique
data compression techniquedata compression technique
data compression technique
CHINMOY PAUL
 
Lec5 Compression
Lec5 CompressionLec5 Compression
Lec5 Compression
anithabalaprabhu
 
Introduction Data Compression/ Data compression, modelling and coding,Image C...
Introduction Data Compression/ Data compression, modelling and coding,Image C...Introduction Data Compression/ Data compression, modelling and coding,Image C...
Introduction Data Compression/ Data compression, modelling and coding,Image C...
Smt. Indira Gandhi College of Engineering, Navi Mumbai, Mumbai
 
image basics and image compression
image basics and image compressionimage basics and image compression
image basics and image compression
murugan hari
 
Compression of digital voice and video
Compression of digital voice and videoCompression of digital voice and video
Compression of digital voice and video
sangusajjan
 
Sunzip user tool for data reduction using huffman algorithm
Sunzip user tool for data reduction using huffman algorithmSunzip user tool for data reduction using huffman algorithm
Sunzip user tool for data reduction using huffman algorithm
Dr Sandeep Kumar Poonia
 
Lossless image compression.(1)
Lossless image compression.(1)Lossless image compression.(1)
Lossless image compression.(1)
MohnishSatidasani
 
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
Helan4
 
Image compression
Image compressionImage compression
Image compression
Shiva Krishna Chandra Shekar
 
Image compression and jpeg
Image compression and jpegImage compression and jpeg
Image compression and jpeg
theem college of engineering
 
10lecture10datacompression-171023182241.pdf
10lecture10datacompression-171023182241.pdf10lecture10datacompression-171023182241.pdf
10lecture10datacompression-171023182241.pdf
PUSHKAR ARYA
 
Dictionary Based Compression
Dictionary Based CompressionDictionary Based Compression
Dictionary Based Compression
anithabalaprabhu
 
Lecture 6 -_presentation_layer
Lecture 6 -_presentation_layerLecture 6 -_presentation_layer
Lecture 6 -_presentation_layer
Serious_SamSoul
 
A research paper_on_lossless_data_compre
A research paper_on_lossless_data_compreA research paper_on_lossless_data_compre
A research paper_on_lossless_data_compre
Luisa Francisco
 
Arithmetic Coding
Arithmetic CodingArithmetic Coding
Arithmetic Coding
anithabalaprabhu
 
Pbl1
Pbl1Pbl1

Similar to Data compression (20)

Data Compression
Data CompressionData Compression
Data Compression
 
2019188026 Data Compression (1) (1).pdf
2019188026 Data Compression  (1) (1).pdf2019188026 Data Compression  (1) (1).pdf
2019188026 Data Compression (1) (1).pdf
 
111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt
 
111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt
 
data compression technique
data compression techniquedata compression technique
data compression technique
 
Lec5 Compression
Lec5 CompressionLec5 Compression
Lec5 Compression
 
Introduction Data Compression/ Data compression, modelling and coding,Image C...
Introduction Data Compression/ Data compression, modelling and coding,Image C...Introduction Data Compression/ Data compression, modelling and coding,Image C...
Introduction Data Compression/ Data compression, modelling and coding,Image C...
 
image basics and image compression
image basics and image compressionimage basics and image compression
image basics and image compression
 
Compression of digital voice and video
Compression of digital voice and videoCompression of digital voice and video
Compression of digital voice and video
 
Sunzip user tool for data reduction using huffman algorithm
Sunzip user tool for data reduction using huffman algorithmSunzip user tool for data reduction using huffman algorithm
Sunzip user tool for data reduction using huffman algorithm
 
Lossless image compression.(1)
Lossless image compression.(1)Lossless image compression.(1)
Lossless image compression.(1)
 
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
 
Image compression
Image compressionImage compression
Image compression
 
Image compression and jpeg
Image compression and jpegImage compression and jpeg
Image compression and jpeg
 
10lecture10datacompression-171023182241.pdf
10lecture10datacompression-171023182241.pdf10lecture10datacompression-171023182241.pdf
10lecture10datacompression-171023182241.pdf
 
Dictionary Based Compression
Dictionary Based CompressionDictionary Based Compression
Dictionary Based Compression
 
Lecture 6 -_presentation_layer
Lecture 6 -_presentation_layerLecture 6 -_presentation_layer
Lecture 6 -_presentation_layer
 
A research paper_on_lossless_data_compre
A research paper_on_lossless_data_compreA research paper_on_lossless_data_compre
A research paper_on_lossless_data_compre
 
Arithmetic Coding
Arithmetic CodingArithmetic Coding
Arithmetic Coding
 
Pbl1
Pbl1Pbl1
Pbl1
 

Recently uploaded

Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
flufftailshop
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
GDSC PJATK
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
LucaBarbaro3
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 

Recently uploaded (20)

Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 

Data compression

  • 2. Why Data Compression?Why Data Compression? Make optimal use of limited storage space Save time and help to optimize resources  If compression and decompression are done in I/O processor, less time is required to move data to or from storage subsystem, freeing I/O bus for other work  In sending data over communication line: less time to transmit and less storage to host
  • 3. Data Compression- EntropyData Compression- Entropy Entropy is the measure of information content in a message.  Messages with higher entropy carry more information than messages with lower entropy. How to determine the entropy  Find the probability p(x) of symbol x in the message  The entropy H(x) of the symbol x is: H(x) = - p(x) • log2p(x) The average entropy over the entire message is the sum of the entropy of all n symbols in the message
  • 4. Data Compression MethodsData Compression Methods Data compression is about storing and sending a smaller number of bits. There’re two major categories for methods to compress data: lossless and lossy methods
  • 5. Lossless Compression MethodsLossless Compression Methods In lossless methods, original data and the data after compression and decompression are exactly the same. Redundant data is removed in compression and added during decompression. Lossless methods are used when we can’t afford to lose any data: legal and medical documents, computer programs.
  • 6. Run-length encodingRun-length encoding  Simplest method of compression.  How: replace consecutive repeating occurrences of a symbol by 1 occurrence of the symbol itself, then followed by the number of occurrences.  The method can be more efficient if the data uses only 2 symbols (0s and 1s) in bit patterns and 1 symbol is more frequent than another.
  • 7. Huffman CodingHuffman Coding  Assign fewer bits to symbols that occur more frequently and more bits to symbols appear less often.  There’s no unique Huffman code and every Huffman code has the same average code length.  Algorithm: a. Make a leaf node for each code symbol Add the generation probability of each symbol to the leaf node a. Take the two leaf nodes with the smallest probability and connect them into a new node Add 1 or 0 to each of the two branches The probability of the new node is the sum of the probabilities of the two connecting nodes a. If there is only one node left, the code construction is completed. If not, go back to (2)
  • 9. Huffman CodingHuffman Coding  Encoding  Decoding
  • 10. Lempel Ziv EncodingLempel Ziv Encoding It is dictionary-based encoding Basic idea:  Create a dictionary(a table) of strings used during communication.  If both sender and receiver have a copy of the dictionary, then previously-encountered strings can be substituted by their index in the dictionary.
  • 11. Lempel Ziv CompressionLempel Ziv Compression Have 2 phases:  Building an indexed dictionary  Compressing a string of symbols • Algorithm:  Extract the smallest substring that cannot be found in the remaining uncompressed string.  Store that substring in the dictionary as a new entry and assign it an index value  Substring is replaced with the index found in the dictionary  Insert the index and the last character of the substring into the compressed string
  • 12. Lempel Ziv CompressionLempel Ziv Compression  Compression example:
  • 13. Lempel Ziv DecompressionLempel Ziv Decompression  It’s just the inverse of compression process
  • 14. Lossy Compression MethodsLossy Compression Methods Used for compressing images and video files (our eyes cannot distinguish subtle changes, so lossy data is acceptable). These methods are cheaper, less time and space. Several methods:  JPEG: compress pictures and graphics  MPEG: compress video  MP3: compress audio
  • 15. JPEG EncodingJPEG Encoding Used to compress pictures and graphics. In JPEG, a grayscale picture is divided into 8x8 pixel blocks to decrease the number of calculations. Basic idea:  Change the picture into a linear (vector) sets of numbers that reveals the redundancies.  The redundancies is then removed by one of lossless compression methods.
  • 16. JPEG Encoding- DCTJPEG Encoding- DCT  DCT: Discrete Concise Transform  DCT transforms the 64 values in 8x8 pixel block in a way that the relative relationships between pixels are kept but the redundancies are revealed.  Example: A gradient grayscale
  • 17. Quantization & CompressionQuantization & Compression Quantization:  After T table is created, the values are quantized to reduce the number of bits needed for encoding.  Quantization divides the number of bits by a constant, then drops the fraction. This is done to optimize the number of bits and the number of 0s for each particular application. • Compression:  Quantized values are read from the table and redundant 0s are removed.  To cluster the 0s together, the table is read diagonally in an zigzag fashion. The reason is if the table doesn’t have fine changes, the bottom right corner of the table is all 0s.  JPEG usually uses lossless run-length encoding at the compression phase.
  • 19. MPEG EncodingMPEG Encoding Used to compress video. Basic idea:  Each video is a rapid sequence of a set of frames. Each frame is a spatial combination of pixels, or a picture.  Compressing video = spatially compressing each frame + temporally compressing a set of frames.
  • 20. MPEG EncodingMPEG Encoding Spatial Compression  Each frame is spatially compressed by JPEG. • Temporal Compression  Redundant frames are removed.  For example, in a static scene in which someone is talking, most frames are the same except for the segment around the speaker’s lips, which changes from one frame to the next.
  • 21. Audio CompressionAudio Compression Used for speech or music  Speech: compress a 64 kHz digitized signal  Music: compress a 1.411 MHz signal • Two categories of techniques:  Predictive encoding  Perceptual encoding
  • 22. Audio EncodingAudio Encoding Predictive Encoding  Only the differences between samples are encoded, not the whole sample values.  Several standards: GSM (13 kbps), G.729 (8 kbps), and G.723.3 (6.4 or 5.3 kbps) • Perceptual Encoding: MP3  CD-quality audio needs at least 1.411 Mbps and cannot be sent over the Internet without compression.  MP3 (MPEG audio layer 3) uses perceptual encoding technique to compress audio.
  • 23. ReferencesReferences http://www.csie.kuas.edu.tw/course/cs/english/ch-1 CS157B-Lecture 19 by Professor Lee http://cs.sjsu.edu/~lee/cs157b/cs157b.html “The essentials of computer organization and architecture” by Linda Null and Julia Nobur.