Comparison study of Fibonacci code algorithm and Even-Rodeh algorithm for data compression

The need for greater storage capacity is the cause of various compression techniques. By compressing, large data will be reduced in size to save storage capacity. This research will use Even-Rodeh code algorithm and Fibonacci code algorithm to compress the data. The performance of algorithms will be measured by Bitrate, Compression Ratio, Space Saving, and Compression Time (millisecond) and Time Decompression (millisecond). Compression is done by reading String in the text file, then Even-Rodeh Code algorithm and Fibonacci code algorithm create String code and perform compression process. The result of compression is the file with extension *. C and *. Fib which contains character information and String Bit. The results of compression can be decompressed to the original text file. The system test used a sample of Strings consisting of one type of character (Homogen String) and String comprising more than one kind of character (Heterogenous String) is stored in the text file by extension * .doc, * .docx, * .pdf. From the compression process on the homogenous String, the Fibonacci code algorithm is more efficient about the compression ratio of 0.25 and decompression time is 0.011 milliseconds compared with the Even-Rodeh code algorithm. While in the compression process on heterogeneous String Fibonacci Code algorithm is better than the Even-Rodeh code algorithm with an average Compression Ratio of 0.65 and decompression time faster with an average of 0.293 milliseconds.


Introduction
The need for greater storage capacity is the cause of the emergence of various compression techniques. By doing compression, large data will decrease in size. In addition to storage problems in sending data size data greatly affects delivery [1]. File sending can be done quickly if the file is small in size, but not all data which people send have a small size of capacity so that we need a large capacity memory to store all the data needed and an unstable internet connection speed requires a relatively long time in the process of sending data. Therefore, in large-scale data transmission, the compression process is also needed. Data compression has been widely applied to various types of data, text, images, and video [2].
Compression is useful for minimizing files that are large. Fibonacci code compression method is a type of compression method based on coding with the Universal code system where the positive value of the integer of the data to form a binary code word by utilizing the Fibonacci code number [3].
Another algorithm that can be used for known compression is the Even-Rodeh code algorithm. Even-Rodeh code algorithm is a data compression algorithm that encodes characters by using a series of bits representing each character based on the frequency of each character. The Even-Rodeh code algorithm is a compression algorithm developed by Shimon Even and Michael Rodeh code in 1978 [4]. In this study, a comparison will be made to the two algorithms namely Fibonacci code and Even-Rodeh code to compress data.

Compression
The size of the data used by humans will require a very large place. Today many programmers are trying to reduce data (data compression). The purpose of reducing the data is to save storage space (memory) so that the storage area does not quickly exceed the capacity and the process of data transfer will be faster. Traditional compression algorithms typically operate on individual bytes [5].
Compression is a stage or process to change the flow of new data flow data that has a smaller data size (data that has been compressed) [6]. The data compression algorithm has two outlines, Lossless compression and Lossy compression [7]. 1. Lossless compression is a data compression method that allows the original data to be completely reconstituted, without losing any information. Lossless compression has a lower degree of compression, but the data accuracy maintained between before and after the compression process. 2. Lossy compression is a data method that does not produce original data before compression [8].
Although the difference is quite close, this type of compression is not good for data compression like text data but is often used in audio data, files, and images. This method provides a higher degree of compression.

Fibonacci codes algorithm
Leonardo Pisano Fibonacci was an Italian mathematician, considered a great medieval Matematiater; he was instrumental in reviving ancient mathematics. In his book Liber Abaci, introducing Europe with Hindu-Arabic notation for numbers. Currently, the Fibonacci series is one of the famous mathematical objects. Fibonacci numbers are defined as numbers whose terms are the sum of the two previous terms [9]. The Fibonacci number can be shown as a number sequence number: 0,1,1,2,3,5,8,13,21,34,55,89,144, ... Table 1 is the Fibonacci code table [10].

Even-Rodeh code algorithm
One known compression algorithm is the Even-Rodeh code algorithm. Even-Rodeh code Algorithm is a data compression algorithm that encodes characters with a series of bits representing characters created based on the frequency of each character. The Even-Rodeh code algorithm is a compression algorithm developed by Shimon Even and Michael Rodeh in 1978 [7].
The stage of building the Even-Rodeh code with n as an index of characters is as follows [11]: 1. Calculate bit length.
2. If the length of the bit is 0 <= n <= 3 then the value of n is changed to binary, adding 0 in front of the binary value so that the bit becomes 3 digits.  3 3. If the bit length is 4 <= n <= 7 then the value of n is converted to binary, adding 0 behind the binary value so that the bit becomes 4 digits. 4. If the length of the bit n> = 8 then the value of n is changed to binary, add 0 behind the binary value then the number is added in front of the binary value as many as the number of digits in the binary value. 5. Some of the Even-Rodeh code codes and the number of Even-Rodeh code codes based on the frequency of characters can be seen in Table 2 and Table 3.

Results and Discussion
There is a text file containing strings "MHD ALI SUBADA ILMU KOMPUTER." The size of orginal string is shown in Table 4. Based on the ASCII code, one character is worth eight bits of a binary number. So that 28 characters on the string have a binary value of 224 bits. Before performing the compression process, characters are first sorted from the largest to the smallest frequency.
Compression analysis process of text files using the Fibonacci Code algorithm. Below is an example of the compression process of a text file using the Fibonacci Code algorithm. There is a text file containing the string "MHD ALI SUBADA COMPUTER SCIENCE." It is shown in Table 5. string size that has been compressed using the Fibonacci Code algorithm.  And the next is to rearrange the codes in Table 6 according to the position of the characters in the string and sorted from the largest to the smallest frequency. So, the bit string that has been compressed is "011000011000111100111001101011111000111011010011001100011001111010111001101110 1111001011101011011000001011100001101000110010011".
First, add the padding bits and flags before the results of the compression are written into the file. Adding to the bit padding and flag bit is done by referring to the remaining number of bits divided by 8. The sum of the results of compression is 129 bits; because 129 is not divisible by 8, it can be obtained padding0000000.
"011000011000111100111001101011111000111011010011001100011001111010111001101110 11110010111010110110000010111000011010001100100110000000" From the addition of 7 bits of padding, flag bit 0000000111 is obtained, and a new string is obtained as follows: "   Table 6.
The next step, rearranging the characters, strings, and codes in the table. The string that has been read is "MHD ALI SUBADA ILMU KOMPUTER".
So, the result of the string bit being compressed is "001111010000000101010110000010010000111001001001010000100001100101000101100010010 1001001011000110011000011100110101001110010011110" First, add the padding and flag bits before the results of the compression are written into the file. Adding to the bit padding and bit flag is done by referring to the remaining number of bits divided by 8. The sum of the compression results is 130 bits; because 130 is not divisible by 8, it can be obtained padding 000000. "001111010000000101010110000010010000111001001001010000100001100101000101100010010 1001001011000110011000011100110101001110010011110000000" From the addition of 6 bits of padding, flag bit 000000110 is obtained. And a new String bit is obtained, namely: "001111010000000101010110000010010000111001001001010000100001100101000101100010010 100100101100011001100001110011010100111001001111000000000000110." Then the total bits obtained are 144 bits.   Table 7, Table 8, Table 9, and Table 10.