Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • Aptitude
  • Engineering Mathematics
  • Discrete Mathematics
  • Operating System
  • DBMS
  • Computer Networks
  • Digital Logic and Design
  • C Programming
  • Data Structures
  • Algorithms
  • Theory of Computation
  • Compiler Design
  • Computer Org and Architecture
Open In App
Next Article:
Protocols in Application Layer
Next article icon

Introduction to Data Compression

Last Updated : 27 Jul, 2021
Comments
Improve
Suggest changes
Like Article
Like
Report

In this article, we will discuss the overview of Data Compression and will discuss its method illustration, and also will cover the overview part entropy. Let’s discuss it one by one. 

Overview :
One important area of research is data compression. It deals with the art and science of storing information in a compact form. One would have noticed that many compression packages are used to compress files. Compression reduces the cost of storage, increases the speed of algorithms, and reduces the transmission cost. Compression is achieved by removing redundancy, that is repetition of unnecessary data. Coding redundancy refers to the redundant data caused due to suboptimal coding techniques.

Method illustration :

  • To illustrate this method let’s assume that there are six symbols, and binary code is used to assign a unique address to each of these symbols, as shown in the following table
  • Binary code requires at least three bits to encode six symbols. It can also be observed that binary codes 110 and 111 are not used at all. This clearly shows that binary code is not efficient, and hence an efficient code is required to assign a unique address. 
Symbols W1 W2 W3 W4 W5 W6
Probability 0.3 0.3 0.1 0.1 0.08 0.02
Binary code 000 001 010 011 100 101
  • An efficient code is one that uses a minimum number of bits for representing any information. The disadvantage of binary code is that it is fixed code; a Huffman code is better, as it is a variable code. 
  • Coding techniques are related to the concepts of entropy and information content, which are studied as a subject called information theory. Information theory also deals with uncertainty present in a message is called the information content. The information content is given as 
                                 log2 (1/pi) or -log2 pi . 

Entropy :

  • Entropy is defined as a measure of orderliness that is present in the information. It is given as follows:
                                    H= - ∑ pi log2 pi
  • Entropy is a positive quantity and specifies the minimum number of bits necessary to encode information. Thus, coding redundancy is given as the difference between the average number of bits used for coding and entropy. 
coding redundancy = Average number of bits - Entropy
  • By removing redundancy, any information can be stored in a compact manner. This is the basis of data compression.

Next Article
Protocols in Application Layer

S

soubhikmitra98
Improve
Article Tags :
  • Computer Networks

Similar Reads

  • What is OSI Model? - Layers of OSI Model
    The OSI (Open Systems Interconnection) Model is a set of rules that explains how different computer systems communicate over a network. OSI Model was developed by the International Organization for Standardization (ISO). The OSI Model consists of 7 layers and each layer has specific functions and re
    14 min read
  • OSI Model Basics

    • OSI Model Full Form - Open System Interconnection
      The OSI stands for Open System Interconnection. OSI model is a conceptual framework that defines how computers communicate with each other over a network. It consists of seven layers, each with its own specific function and set of protocols. In this article, we are going to discuss OSI model, its se
      9 min read

    • OSI Full Form
      OSI stands for Open Systems Interconnection. It is a model used in computer networking to explain how data moves from one device to another across a network. The OSI model has 7 layers, and each layer has a specific function, from sending raw data to delivering it to the right application. It helps
      5 min read

    • Working of ISO-OSI Model
      The ISO-OSI (International organization of Standardization - Open System Interconnection) says to group together the functions which are related to each other. The Functions in OSI Model that are needed for proper communication can be divided into 2 types :- 1. Mandatory Functions: Here the implemen
      7 min read

    • Critique of OSI Model and Protocols
      Open System Interconnection (OSI) model is reference model that is used to describe and explain how does information from software application in one of computers moves freely through physical medium to software application on another computer. This model consists of total of seven layers and each o
      4 min read

    OSI Model and TCP/IP Model

    • Similarities Between OSI Model and TCP/IP Model
      OSI Model or Open Systems Interconnection is an architecture of 7 layers in which each layer has its work to perform. In contrast, TCP/IP is a concise version of the OSI Model. The TCP/IP Model consists of 4 layers rather than the 7 layers of the OSI Model. In this article, we will look into the sim
      6 min read

    • This is exactly why we still use the OSI model when we have TCP/IP Model
      What is the OSI Model?OSI is an acronym for Open Systems Interconnection. The International Organization for Standardization (ISO) created the OSI model (ISO). It's a model for how applications communicate over the internet. In order to facilitate interoperability between diverse devices and applica
      10 min read

  • How Communication happens using OSI model
    The Open System Interconnection (OSI) model is a standard “reference model” created by an International Organization for Standardization (ISO) to describe how software and hardware components involved in network communication divide efforts and interact with each other. The OSI model defines a seven
    4 min read
  • Physical Layer

    • Types of Network Topology
      Network topology refers to the arrangement of different elements like nodes, links, or devices in a computer network. Common types of network topology include bus, star, ring, mesh, and tree topologies, each with its advantages and disadvantages. In this article, we will discuss different types of n
      12 min read

    • Transmission Modes in Computer Networks (Simplex, Half-Duplex and Full-Duplex)
      Transmission modes also known as communication modes, are methods of transferring data between devices on buses and networks designed to facilitate communication. They are classified into three types: Simplex Mode, Half-Duplex Mode, and Full-Duplex Mode. In this article, we will discuss Transmission
      6 min read

    Data Link Layer

    • Logical Link Control (LLC) Protocol Data Unit
      Logical Link Control (LLC) is a sublayer that generally provides the logic for the data link as it controls the synchronization, multiplexing, flow control, and even error-checking functions of DLL (Data Link Layer). DLL is divided into two sublayers i.e. LLC sublayer and MAC (Medium Access Control)
      3 min read

    • Framing in Data Link Layer
      Frames are the units of digital transmission, particularly in computer networks and telecommunications. Frames are comparable to the packets of energy called photons in the case of light energy. Frame is continuously used in Time Division Multiplexing process. Framing is a point-to-point connection
      6 min read

    • Error Control in Data Link Layer
      Data-link layer uses the techniques of error control simply to ensure and confirm that all the data frames or packets, i.e. bit streams of data, are transmitted or transferred from sender to receiver with certain accuracy. Using or providing error control at this data link layer is an optimization,
      4 min read

    • Flow Control in Data Link Layer
      Flow control is design issue at Data Link Layer. It is a technique that generally observes the proper flow of data from sender to receiver. It is very essential because it is possible for sender to transmit data or information at very fast rate and hence receiver can receive this information and pro
      4 min read

    • Access Control in Computer Network
      Access control is a security strategy that controls who or what can view or utilize resources in a computer system. It is a fundamental security concept that reduces risk to the company or organization. In this article, we are going to discuss every point about access control. In this article, we wi
      7 min read

    • Examples of Data Link Layer Protocols
      Data Link Layer protocols are generally responsible for ensuring and confirming that the bits and bytes received are identical to the bits and bytes being transferred. It is a set of specifications that are used for the implementation of the data link layer just above the physical layer of the Open
      5 min read

    Network Layer

    • Network Layer Services
      The network layer is a part of the communication process in computer networks. Its main job is to move data packets between different networks. It helps route these packets from the sender to the receiver across multiple paths and networks. Network-to-network connections enable the Internet to funct
      6 min read

    • Network Protocols
      Network Protocols are a set of guidelines governing the exchange of information in a simple, dependable and secure way. Network protocols are formal standards and policies comprised of rules, methodology, and configurations that define communication between two or more devices over a network. To eff
      3 min read

    • What is an IP Address?
      Imagine every device on the internet as a house. For you to send a letter to a friend living in one of these houses, you need their home address. In the digital world, this home address is what we call an IP (Internet Protocol) Address. It's a unique string of numbers separated by periods (IPv4) or
      14 min read

    • ARP, Reverse ARP(RARP), Inverse ARP (InARP), Proxy ARP and Gratuitous ARP
      Prerequisite IP Addressing, Introduction of MAC Addresses, Basics of Address Resolution Protocol (ARP) In this article, we will discuss about whole ARP-family, which are ARP, RARP, InARP, Proxy ARP and Gratuitous ARP. Let's try to understand each one by one. 1. Address Resolution Protocol (ARP) -Add
      6 min read

    • Internet Control Message Protocol (ICMP)
      Internet Control Message Protocol is known as ICMP. The protocol is at the network layer. It is mostly utilized on network equipment like routers and is utilized for error handling at the network layer. Since there are various kinds of network layer faults, ICMP can be utilized to report and trouble
      11 min read

    • What is IGMP(Internet Group Management Protocol)?
      IGMP is an acronym for Internet Group Management Protocol. IGMP is a communication protocol used by hosts and adjacent routers for multicasting communication with IP networks and uses the resources efficiently to transmit the message/data packets. Multicast communication can have single or multiple
      9 min read

    Transport Layer

    • Transport Layer responsibilities
      The transport Layer is the second layer in the TCP/IP model and the fourth layer in the OSI model. It is an end-to-end layer used to deliver messages to a host. It is termed an end-to-end layer because it provides a point-to-point connection rather than hop-to-hop, between the source host and destin
      5 min read

    • Error Control in TCP
      Prerequisite - TCP/IP Model TCP protocol has methods for finding out corrupted segments, missing segments, out-of-order segments and duplicated segments. Error control in TCP is mainly done through the use of three simple techniques : Checksum - Every segment contains a checksum field which is used
      2 min read

    • What is TCP (Transmission Control Protocol)?
      Transmission Control Protocol (TCP) is a connection-oriented protocol for communications that helps in the exchange of messages between different devices over a network. It is one of the main protocols of the TCP/IP suite. In OSI model, it operates at the transport layer(Layer 4). It lies between th
      5 min read

    • User Datagram Protocol (UDP)
      User Datagram Protocol (UDP) is a Transport Layer protocol. UDP is a part of the Internet Protocol suite, referred to as UDP/IP suite. Unlike TCP, it is an unreliable and connectionless protocol. So, there is no need to establish a connection before data transfer. The UDP helps to establish low-late
      10 min read

    • SCTP Full Form
      SCTP stands for Stream Control Transmission Protocol. It is a connection- oriented protocol in computer networks which provides a full-duplex association i.e., transmitting multiple streams of data between two end points at the same time that have established a connection in network. It is sometimes
      3 min read

    Presentation Layer

    • What is Data Encryption?
      Data encryption is the process of converting readable information (plaintext) into an unreadable format (ciphertext) to protect it from unauthorized access. It is a method of preserving data confidentiality by transforming it into ciphertext, which can only be decoded using a unique decryption key p
      10 min read

    • Introduction to Data Compression
      In this article, we will discuss the overview of Data Compression and will discuss its method illustration, and also will cover the overview part entropy. Let's discuss it one by one. Overview :One important area of research is data compression. It deals with the art and science of storing informati
      2 min read

    Application Layer

    • Protocols in Application Layer
      The Application Layer is the topmost layer in the Open System Interconnection (OSI) model. This layer provides several ways for manipulating the data which enables any type of user to access the network with ease. The Application Layer interface directly interacts with the application and provides c
      7 min read

    • File Transfer Protocol (FTP)
      File transfer protocol (FTP) is an Internet tool provided by TCP/IP. The first feature of FTP was developed by Abhay Bhushan in 1971. It helps to transfer files from one computer to another by providing access to directories or folders on remote computers and allows software, data, and text files to
      8 min read

    • HTTP Full Form - Hypertext Transfer Protocol
      HTTP is the primary method through which web browsers and servers communicate to share information on the internet. It was invented by Tim Berners-Lee. HyperText refers to text that is specially coded using a standard coding language called HyperText Markup Language (HTML). HTTP/2 is the updated ver
      8 min read

    • Simple Mail Transfer Protocol (SMTP)
      Simple Mail Transfer Protocol (SMTP) is an application layer protocol used for exchanging email messages between servers. It is essential in the email communication process and operates at the application layer of the TCP/IP stack. To send an email, the client opens a TCP connection to the SMTP serv
      9 min read

    • Introduction to TELNET
      TELNET stands for Teletype Network. It is a client/server application protocol that provides access to virtual terminals of remote systems on local area networks or the Internet. The local computer uses a telnet client program and the remote computers use a telnet server program. In this article, we
      7 min read

geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences