Analisis Perbandingan Algoritma Huffman dan Run Length Encoding Pada Kompresi File Audio

vii

ANALISIS PERBANDINGAN ALGORITMA HUFFMAN
DAN RUN LENGTH ENCODING PADA
KOMPRESI FILE AUDIO

ABSTRAK

Penelitian ini dilakukan untuk menganalisis perbandingan hasil kompresi dan
dekompresi file audio *.mp3 (Moving Picture Expert Group) -1 audio layer III) dan
*.wav. Kompresi dilakukan dengan mengurangi jumlah bit yang diperlukan untuk
menyimpan atau mengirim file tersebut. Pada penelitian ini penulis menggunakan
algoritma Huffman dan Run Length Encoding yang merupakan salah satu teknik
kompresi yang bersifat lossless. Algoritma Huffman memiliki tiga tahapan untuk
mengkompres data, yaitu pembentukan pohon, encoding dan decoding dan berkerja
berdasarkan karakter per karakter. Sedangkan teknik run length ini bekerja
berdasarkan sederetan karakter yang berurutan, yaitu hanya memindahkan
pengulangan byte yang sama berturut-turut secara terus-menerus. Parameter yang
digunakan untuk mengukur kinerja algoritma ini adalah rasio kompresi, kompleksitas
yang dihasilkan. Rasio kompresi file audio *.mp3 menggunakan Algoritma Huffman
memiliki rata-rata 1.426% sedangkan RLE -94.44%, dan rasio kompresi file audio

*.wav memiliki rata-rata 28.954 % sedangkan RLE -45.91%, kompleksitas waktu
algoritma Huffman adalah θ nLog n sedangkan algoritma Run Length Encoding adalah
θ (n).
Kata Kunci: kompresi, dekompresi, mp3, wav, Huffman, Run Length Encoding,
lossless, lossy.

Universitas Sumatera Utara

viii

COMPARATIVE ANALYSIS ALGORITHM HUFFMAN
AND RUN LENGTH ENCODING IN
FILE COMPRESSION AUDIO
ABSTRACT

This study was conducted to analyze the comparison of compression and
decompression of audio files * .mp3 (Moving Picture Expert Group) -1 audio layer
III) and * .wav. Compression is done by reducing the number of bits required to store
or send the file. In this study the author uses Huffman and Run Length Encoding,
which is one that is lossless compression technique. Huffman has three stages to

compress the data, namely the establishment of the tree, encoding and decoding, and
work is based on a character-by-character. While the technique of run length work
based on a series of consecutive characters, namely just move repetition of the same
byte row continuously. The parameters used to measure the performance of the
algorithm is the compression ratio, the resulting complexity. The compression ratio *
.mp3 audio files using Huffman algorithm has an average of 1,426%, while RLE 94.44%, and the compression ratio * .wav audio file has an average of 28 954% and 45.91% RLE, Huffman algorithm time complexity is θ nLog n while Run Length
Encoding algorithm is θ (n).
Keywords: compression, decompression, mp3, wav, Huffman, Run Length Encoding,
lossless, lossy.

Universitas Sumatera Utara