Data Compression Algorithms for Energy-Constrained Devices in Delay Tolerant Networks Christopher M. Sadler and Margaret Martonosi In: Proc. of the 4th.

Slides:



Advertisements
Similar presentations
Source Coding Data Compression A.J. Han Vinck. DATA COMPRESSION NO LOSS of information and exact reproduction (low compression ratio 1:4) general problem.
Advertisements

CSCI 3280 Tutorial 6. Outline  Theory part of LZW  Tree representation of LZW  Table representation of LZW.
Greedy Algorithms (Huffman Coding)
Data Compressor---Huffman Encoding and Decoding. Huffman Encoding Compression Typically, in files and messages, Each character requires 1 byte or 8 bits.
Lempel-Ziv-Welch (LZW) Compression Algorithm
Algorithms for Data Compression
Data Compression Michael J. Watts
Lossless Compression - II Hao Jiang Computer Science Department Sept. 18, 2007.
Algorithm Programming Some Topics in Compression Bar-Ilan University תשס"ח by Moshe Fresko.
Lempel-Ziv Compression Techniques Classification of Lossless Compression techniques Introduction to Lempel-Ziv Encoding: LZ77 & LZ78 LZ78 Encoding Algorithm.
Lempel-Ziv Compression Techniques
A Data Compression Algorithm: Huffman Compression
Algorithm Programming Some Topics in Compression
Lempel-Ziv-Welch (LZW) Compression Algorithm
Hash Tables1 Part E Hash Tables  
Data Compression Algorithms for Energy-Constrained Devices in Delay Tolerant Networks Christopher Sadler Margaret Martonosi Princeton University.
Hash Tables1 Part E Hash Tables  
Lempel-Ziv Compression Techniques
Lecture 4 Source Coding and Compression Dr.-Ing. Khaled Shawky Hassan
Data Compression Basics & Huffman Coding
Lossless Compression Multimedia Systems (Module 2 Lesson 3)
Data Compression Arithmetic coding. Arithmetic Coding: Introduction Allows using “fractional” parts of bits!! Used in PPM, JPEG/MPEG (as option), Bzip.
Data Structures and Algorithms Huffman compression: An Application of Binary Trees and Priority Queues.
Noiseless Coding. Introduction Noiseless Coding Compression without distortion Basic Concept Symbols with lower probabilities are represented by the binary.
Text Compression Spring 2007 CSE, POSTECH. 2 2 Data Compression Deals with reducing the size of data – Reduce storage space and hence storage cost Compression.
1 Lossless Compression Multimedia Systems (Module 2 Lesson 2) Summary:  Adaptive Coding  Adaptive Huffman Coding Sibling Property Update Algorithm 
Page 110/6/2015 CSE 40373/60373: Multimedia Systems So far  Audio (scalar values with time), image (2-D data) and video (2-D with time)  Higher fidelity.
Fundamental Structures of Computer Science Feb. 24, 2005 Ananda Guna Lempel-Ziv Compression.
Lecture 29. Data Compression Algorithms 1. Commonly, algorithms are analyzed on the base probability factor such as average case in linear search. Amortized.
Fundamental Structures of Computer Science March 23, 2006 Ananda Guna Lempel-Ziv Compression.
Fundamental Data Structures and Algorithms Aleks Nanevski February 10, 2004 based on a lecture by Peter Lee LZW Compression.
EEM 480 Lecture 11 Hashing and Dictionaries. Symbol Table Symbol tables are used by compilers to keep track of information about variables functions class.
Cryptographic Attacks on Scrambled LZ-Compression and Arithmetic Coding By: RAJBIR SINGH BIKRAM KAHLON.
Multimedia Data Introduction to Lossless Data Compression Dr Sandra I. Woolley Electronic, Electrical.
Compression.  Compression ratio: how much is the size reduced?  Symmetric/asymmetric: time difference to compress, decompress?  Lossless; lossy: any.
1 Source Coding and Compression Dr.-Ing. Khaled Shawky Hassan Room: C3-222, ext: 1204, Lecture 5.
The LZ family LZ77 LZ78 LZR LZSS LZB LZH – used by zip and unzip
Huffman Coding. Huffman codes can be used to compress information –Like WinZip – although WinZip doesn’t use the Huffman algorithm –JPEGs do use Huffman.
Lossless Compression CIS 465 Multimedia. Compression Compression: the process of coding that will effectively reduce the total number of bits needed to.
Fundamental Data Structures and Algorithms Margaret Reid-Miller 24 February 2005 LZW Compression.
Recent Results in Combined Coding for Word-Based PPM Radu Rădescu George Liculescu Polytechnic University of Bucharest Faculty of Electronics, Telecommunications.
Data Compression Reduce the size of data.  Reduces storage space and hence storage cost. Compression ratio = original data size/compressed data size.
Huffman Codes Juan A. Rodriguez CS 326 5/13/2003.
A New Operating Tool for Coding in Lossless Image Compression Radu Rădescu University POLITEHNICA of Bucharest, Faculty of Electronics, Telecommunications.
1 Chapter 7 Skip Lists and Hashing Part 2: Hashing.
CS654: Digital Image Analysis Lecture 34: Different Coding Techniques.
Lecture 7 Source Coding and Compression Dr.-Ing. Khaled Shawky Hassan
Lempel-Ziv methods.
CS 1501: Algorithm Implementation LZW Data Compression.
Lempel-Ziv-Welch Compression
Page 1KUT Graduate Course Data Compression Jun-Ki Min.
CS 1501: Algorithm Implementation
Data Compression Michael J. Watts
CSE 589 Applied Algorithms Spring 1999
HUFFMAN CODES.
Data Coding Run Length Coding
Data Compression.
Lempel-Ziv-Welch (LZW) Compression Algorithm
Applied Algorithmics - week7
Lempel-Ziv Compression Techniques
Information of the LO Subject: Information Theory
Lempel-Ziv-Welch (LZW) Compression Algorithm
Lempel-Ziv-Welch (LZW) Compression Algorithm
Data Compression Reduce the size of data.
Lempel-Ziv Compression Techniques
Huffman Coding CSE 373 Data Structures.
Number Systems Instructions, Compression & Truth Tables.
Table 3. Decompression process using LZW
High-capacity Reversible Data-hiding for LZW Codes
Lempel-Ziv-Welch (LZW) Compression Algorithm
Presentation transcript:

Data Compression Algorithms for Energy-Constrained Devices in Delay Tolerant Networks Christopher M. Sadler and Margaret Martonosi In: Proc. of the 4th ACM Conference on Embedded Networked Sensor Systems (SenSys), Reporter: 王滋農

1. Motivation Previous algorithms of compressing acquired data in sensor systems - application-specific algorithms - off-the-shelf algorithms → Not for resource-constrained sensor nodes Standard compression algorithms are aimed at saving storage not energy

2. Outline LZW compression LZW for Sensor Nodes (S-LZW) S-LZW with Mini-Cache (S-LZW-MC)

3.1 LZW introduction (1/4) The LZW Compression Algorithm is a dictionary-based algorithm, which always tries to output short codes for strings that are already present in it's dictionary LZW compression uses a code table, with 4096 (12 bits) as a common choice for the number of table entries Codes (ASCII code 8 bits) in the code table are always assigned to represent single bytes from the input file When encoding begins the code table contains only the first 256 entries, with the remainder of the table being blanks Compression is achieved by using codes 256 through 4095 to represent sequences of bytes As the encoding continues, LZW identifies repeated sequences in the data, and adds them to the code table

3.1 LZW algorithm (2/4) Initialize table with single character strings P = first input character Codeword = 256 WHILE not end of input stream C = next input character IF P + C is in the string table P = P + C ELSE output the code for P add P + C to the string table Codeword++ P = C END IF END WHILE output code for P

3.1 LZW example (3/4) Compressing the string: BABAABAAA STRING TABLEENCODER OUTPUT stringcodewordrepresentingoutput code BA256B66 AB257A65 BAA258BA256 ABA259AB257 AA260A65 AA260

3.1 LZW example (4/4) Uncompressed String: aaabbbbbbaabaaba Number of bits = Total number of characters * 8 = 16 * 8 = 128 bits Compressed string (codewords): Number of bits = Total Number of codewords * 12 = 7 * 12 = 84 bits

Outline LZW compression LZW for Sensor Nodes(S-LZW) S-LZW with Mini-Cache (S-LZW-MC)

3.2 S-LZW introduction (1/5) Never deliver 100% of data to others - dictionary size - data size

3.2 S-LZW algorithm (2/5) Dictionary size - Experimented with 512, 768, 1024 & Unlimited. - Block sizes of 1, 2, 4 & 10 Flash pages. S ‐ LZW uses 512 entry dictionary and 4 pages or less

3.2 S-LZW algorithm (3/5)

3.2 S-LZW algorithm (4/5) Data Size – Evaluated 1, 2 & 4 flash page sizes. – Compressed either 2 pages in one block or two individual one ‐ page blocks. – Also, 4 pages in either one block or two individual two page blocks. – Compression ratio benefits while using a block of 2 pages. SS, GDI, ZNet & Calgeo improvements – 25.5%, 12.9%, 4.6%, 3.3%. – Compute times benefit while using a block of 2 pages. SS, GDI, ZNet & Calgeo improvements – 24.5%, 1.7%, 5.3%, 1.1% S ‐ LZW compresses data in block of 528 Bytes (2 Pages) → SS (SensorScope): indoor environmental monitoring → ZNet (ZebraNet): a combination GPS data and debugging data → GDI (Great Duck Island):Habitat and environmental monitoring data → Calgeo (Calgary Corpus): seismic data

SENSOR DATA – N BYTES GENERATED OVER TIME … 528 B Block (2 Flash Pages) COMP. ALGORITHM Compressed Data …… … … … … 528 B Block (2 Flash Pages) 3.2 S-LZW algorithm (5/5)

Outline LZW compression LZW for Sensor Nodes(S-LZW) S-LZW with Mini-Cache (S-LZW-MC)

3.3 S-LZW-MC introduction (1/3) A variant of S-LZW Data acquiring over short intervals

3.3 S-LZW-MC flow chart (2/3) Flow chart of S-LZW-MC

3.3 S-LZW-MC example (3/3) Hit => Saves multiple bits: (Log 2 N)+1 Bit Miss => Costs just 1 extra escape bit: (9+1)

4. Novelty Proposing novel approaches tailored to the unique trade-offs and constraints of sensors

5. Strength An efficient and lossless data compression algorithms on the source node The compression algorithms are suitable for static and mobile sensor network and applicable to a wide range of applications

6. Weakness This paper doesn’t clearly describe how to solve the problem when the dictionary fills Not the optimum compression ratio

Thank you

 What happens when the dictionary gets too large (i.e., when all the 4096 locations have been used)?  Here are some options usually implemented:  Simply forget about adding any more entries and use the table as is.  Throw the dictionary away when it reaches a certain size.  Throw the dictionary away when it is no longer effective at compression.  Clear entries and start building the dictionary again.  Some clever schemes rebuild a string table from the last N input characters.

Appendix

LZW Decompression  The LZW decompressor creates the same string table during decompression.  It starts with the first 256 table entries initialized to single characters.  The string table is updated for each character in the input stream, except the first one.  Decoding achieved by reading codes and translating them through the code table being built.

LZW Decompression Algorithm 1 Initialize table with single character strings 2 OLD = first input code 3 output translation of OLD 4 WHILE not end of input stream 5 NEW = next input code 6 IF NEW is not in the string table 7 S = translation of OLD 8 S = S + C 9 ELSE 10 S = translation of NEW 11 output S 12 C = first character of S 13 OLD + C to the string table 14 OLD = NEW 15 END WHILE

Example 2: LZW Decompression 1 Example 2: Use LZW to decompress the output sequence of Example 1:.

Example 2: LZW Decompression Step 1 Old = 65 S = A New = 66 C = A STRING TABLEENCODER OUTPUT stringcodewordstring B BA256A

Example 2: LZW Decompression Step 2 Old = 256 S = BA New = 256 C = B STRING TABLEENCODER OUTPUT stringcodewordstring B BA256A AB257BA

Example 2: LZW Decompression Step 3 Old = 257 S = AB New = 257 C = A STRING TABLEENCODER OUTPUT stringcodewordstring B BA256A AB257BA BAA258AB

Example 2: LZW Decompression Step 4 Old = 65 S = A New = 65 C = A STRING TABLEENCODER OUTPUT stringcodewordstring B BA256A AB257BA BAA258AB ABA259A

Example 2: LZW Decompression Step 5 Old = 260 S = AA New = 260 C = A STRING TABLEENCODER OUTPUT stringcodewordstring B BA256A AB257BA BAA258AB ABA259A AA260AA