+ All Categories
Home > Documents > Kompresi Huffman

Kompresi Huffman

Date post: 03-Apr-2015
Category:
Upload: andysah-putra-utama-siahaan-mkom
View: 143 times
Download: 2 times
Share this document with a friend
Description:
Huffman Text Compression, Created By: Andysah Putra Utama Siahaan, S.Kom
20
Huffman Algorithm for Text Compression Created By: Andysah Putra U. Siahaan, S.Kom 107038005
Transcript
Page 1: Kompresi Huffman

Huffman Algorithmfor Text CompressionCreated By: Andysah Putra U. Siahaan, S.Kom

107038005

Page 2: Kompresi Huffman

Introduction

•What is data compression?•What is binary encoding?•What is FLBE?

Page 3: Kompresi Huffman

Huffman Theory

String : “LIKA LIKU LAKI-LAKI TAK LAKU-LAKU”

Character Set : “LIKA-U T”

CHAR L I K A - U T

FREQ 6 4 7 6 3 3 3 1

Page 4: Kompresi Huffman

Huffman Theory

The Table must be sorted with ascending order.

CHAR T - U I L A K

FREQ 1 3 3 3 4 6 6 7

Page 5: Kompresi Huffman

Phase One

T

1

-

3

*

4

U * I L A K

3 3 4 4 6 6 7

Page 6: Kompresi Huffman

Phase Two

U

3

-

3

*

6

* I * L A K

4 4 6 6 6 7

Page 7: Kompresi Huffman

Phase Three

*

4

I

4

*

8

* L A K *

6 6 6 7 8

Page 8: Kompresi Huffman

Phase Four

*

6

L

6

*

12

A K * *

6 7 8 12

Page 9: Kompresi Huffman

Phase Five

A

6

K

7

*

13

* * *

8 12 13

Page 10: Kompresi Huffman

Phase Six

*

8

*

12

*

20

* *

13 20

Page 11: Kompresi Huffman

Phase Seven

*

13

*

20

*

33

*

33

Page 12: Kompresi Huffman

Huffman Tree

*

13

*

20

*

33

*

8

*

12

A

6

K

7

*

6

L

6

*

4

I

4

U

3

-

3

T

1

-

3

Page 13: Kompresi Huffman

Huffman Table

CHAR CODE LENGTH FREQ CL * F

L 111 3 6 18

I 101 3 4 12

K 01 2 7 14

A 00 2 6 12

- 1001 4 3 12

U 1100 4 3 12

SPACE 1101 4 3 12

T 1000 4 1 4

Page 14: Kompresi Huffman

Compression Method

Binary Code :

111 101 01 00 1001 111 101 01 1100 1101 111 00 01 101 1001 111 00 01 101 1101 1000 00 01 1101 111 00 01 1100 1001 111 00 01 1100

Page 15: Kompresi Huffman

ASCII Convertered Bit

Binary Code : 11110101 00100111 11010111 00110111 10001101 10011110 00110111 0110000001110111 10001110 01001111 00011100

Decimal Code:245, 39, 215, 55, 141, 158, 55, 96119, 142, 79, 28

Page 16: Kompresi Huffman

ASCII Table

Page 17: Kompresi Huffman

ASCII Table (Extended)

Page 18: Kompresi Huffman

Result

Decimal Code:245, 39, 215, 55, 141, 158, 55, 96119, 142, 79, 28

Page 19: Kompresi Huffman

Conclusion

Huffman is one of the compression algorithm. Huffman algorithm is the most famous algorithm to compress text. There are three phases in the Huffman algorithm to compress a text, the first is the phase formation of the Huffman tree, the second phase of the three phases of encoding and decoding. The last phase is converting into text.

Page 20: Kompresi Huffman

Thanks For Watching


Recommended