Comp 335 File Structures Data Compression. Why Study Data Compression? Conserves storage space Files can be transmitted faster because there are less.

Slides:



Advertisements
Similar presentations
Data Compression CS 147 Minh Nguyen.
Advertisements

Michael Alves, Patrick Dugan, Robert Daniels, Carlos Vicuna
February 1 & 31 Csci 2111: Data and File Structures Week4, Lectures 1 & 2 Organizing Files for Performance.
Rectangle Image Compression Jiří Komzák Department of Computer Science and Engineering, Czech Technical University (CTU)
Compression & Huffman Codes
Introduction to Data Compression
CPSC 231 Organizing Files for Performance (D.H.) 1 LEARNING OBJECTIVES Data compression. Reclaiming space in files. Compaction. Searching. Sorting, Keysorting.
Compression Techniques. Digital Compression Concepts ● Compression techniques are used to replace a file with another that is smaller ● Decompression.
SWE 423: Multimedia Systems
CSCI 3 Chapter 1.8 Data Compression. Chapter 1.8 Data Compression  For the purpose of storing or transferring data, it is often helpful to reduce the.
Compression JPG compression, Source: Original 10:1 Compression 45:1 Compression.
A Data Compression Algorithm: Huffman Compression
Compression & Huffman Codes Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Data Representation CS105. Data Representation Types of data: – Numbers – Text – Audio – Images & Graphics – Video.
ICT Foundation 1 Copyright © 2010, IT Gatekeeper Project – Ohiwa Lab. All rights reserved. Data Compression.
Data Compression Basics & Huffman Coding
September,2012 File Compression 8/6/ Compiled By:- Solomon W. Demissie.
Data dan Teknologi Multimedia Sesi 08 Nofriyadi Nurdam.
Spring 2015 Mathematics in Management Science Binary Linear Codes Two Examples.
8. Compression. 2 Video and Audio Compression Video and Audio files are very large. Unless we develop and maintain very high bandwidth networks (Gigabytes.
Lecture 10 Data Compression.
Cosc 2150: Computer Organization Chapter 2a Data compression.
Chapter 2 Source Coding (part 2)
Computer Vision – Compression(2) Hanyang University Jong-Il Park.
MULTIMEDIA TECHNOLOGY SMM 3001 DATA COMPRESSION. In this chapter The basic principles for compressing data The basic principles for compressing data Data.
Chapter 11 Fluency with Information Technology 4 th edition by Lawrence Snyder (slides by Deborah Woodall : 1.
1 Analysis of Algorithms Chapter - 08 Data Compression.
Multimedia Specification Design and Production 2012 / Semester 1 / L3 Lecturer: Dr. Nikos Gazepidis
Still-image compression Moving-image compression and File types.
Image Compression (Chapter 8) CSC 446 Lecturer: Nada ALZaben.
In this lecture, you will learn: 1 Basic ideas of video compression General types of compression methods.
Chapter Ten The Application and Presentation Layers.
Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.
COMPRESSION. Compression in General: Why Compress? So Many Bits, So Little Time (Space) CD audio rate: 2 * 2 * 8 * = 1,411,200 bps CD audio storage:
Huffman Code and Data Decomposition Pranav Shah CS157B.
Data Compression Reduce the size of data.  Reduces storage space and hence storage cost. Compression ratio = original data size/compressed data size.
CS654: Digital Image Analysis Lecture 34: Different Coding Techniques.
Chapter 3 Data Representation. 2 Compressing Files.
CS 1501: Algorithm Implementation LZW Data Compression.
STATISTIC & INFORMATION THEORY (CSNB134) MODULE 11 COMPRESSION.
Sound (analogue signal). time Sound (analogue signal) time.
Characters CS240.
Lecture 12 Huffman Coding King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science Department.
Information Systems Design and Development Media Types Computing Science.
Computer Sciences Department1. 2 Data Compression and techniques.
1 SWE 423 – Multimedia System. 2 SWE Multimedia System Introduction  Compression is the process of coding that will effectively reduce the total.
Submitted To-: Submitted By-: Mrs.Sushma Rani (HOD) Aashish Kr. Goyal (IT-7th) Deepak Soni (IT-8 th )
File Compression 3.3.
Vocabulary byte - The technical term for 8 bits of data.
Compression & Huffman Codes
Vocabulary byte - The technical term for 8 bits of data.
CPSC 231 Organizing Files for Performance (D.H.)
IMAGE COMPRESSION.
Computer Science Higher
Lecture 7 Data Compression
Data Compression.
Lesson Objectives Aims You should know about: 1.3.1:
File Compression 3.3.
Data Compression.
AP CSP: Bytes, File Sizes, and Text Compression
Data Compression CS 147 Minh Nguyen.
Representing Images 2.6 – Data Representation.
Data Compression Reduce the size of data.
Topic 3: Data Compression.
CSE 589 Applied Algorithms Spring 1999
Unit 2- Lesson 1 & 2- Bytes and File Sizes / Text Compression
Data Compression.
Chapter 8 – Compression Aims: Outline the objectives of compression.
GCSE COMPUTER SCIENCE Topic 3 - Data 3.9 Data Compression.
Presentation transcript:

Comp 335 File Structures Data Compression

Why Study Data Compression? Conserves storage space Files can be transmitted faster because there are less bits to transmit. “Matures” the computer science student!!

What is Data Compression? The “encoding” of data in a file in such a way as to take up less space. Two Basic Methods of Data Compression  REDUNDANCY REDUCTION  REPEATING SEQUENCE SUPPRESSION

Redundancy Reduction Decreasing the number of bits to represent the data Example: Assume a record maintains a STATE field which could contain the abbreviation for the fifty states. This necessitates a two byte field.

Redundancy Reduction There are only fifty possible values which could be in this STATE field. A two byte field is 16 bits. A bit savings could be created by using x number of bits to represent the 50 different possibilites. How many bits would we need? The answer is 6….Why?

Redundancy Reduction We exchange for 16 bits for 6…SO WHAT IS THE BIG DEAL? Suppose a file contains 1,000,000 records where each record has this field. How much space savings would be achieved if each state field were 6 bits instead of ,000,000 bits or 1,250,000 bytes.

Repeating Sequence Suppression Used with files which have the characteristic of byte patterns which repeat. Graphic files such a bitmaps are good candidates for using this type of compression. Run-length encoding is a method of suppressing these repeating codes.

Run-Length Encoding Replace repeating sequences with three (or four) bytes. Byte 1 – Run length code indicator Byte 2 – Byte code which is repeated Byte 3 – number of times byte code repeated. (With only one byte, a code cannot be repeated more than 255 times)

Fixed and Variable Length Encoding This is a type of redundancy reduction. The idea is to take a file and examine the byte codes which exist. (There can only be 256 different byte codes.) Fixed length encoding will create a special encoding for each byte code using only the number of bits necessary to represent the total number of unique byte codes. Each new encoding will be the same number of bits.

Fixed and Variable Length Encoding Variable length encoding will do the same as fixed length except each new encoding will be a variable number of bits. The Huffman Algorithm is a very popular type of data compression algorithm and is a variable length encoding algorithm. We will be studying in depth this algorithm. However, Morse code, is the oldest and most common of variable length encoding schemes.

Lossy vs Lossless Compression Lossless – a type of data compression algorithm which compresses a file in a manner that will allow a perfect reconstruction of the original when decompressed. It is used in the popular ZIP format as well as the Unix tool gzip. Typical examples are file executables, source code, and some image file formats, notably PNG. The Huffman algorithm is a lossless algorithm. Lossy – this type of algorithm will not enable a prefect reconstruction of the original file compressed. Most often used from compressing sound, video, and images.