A hybrid code compression technique using bitmask and prefix encoding with enhanced dictionary selection

Memory is one of the most significant detrimental factors in increasing the cost and area of embedded systems, especially assemiconductor technology scales down. Code compression techniques have been employed to reduce the memory requirement of the system without sacrificing its functionality. Bitmask-based code compression has been demonstrated to be a successful technique that produces low compression ratios while having a fast and simple decompression engine. However, the current approach requires dictionary sizes of +16K bytes to produce acceptable results, adding significant overhead to the system. In this paper, we develop a new hybrid encoding method that combines the traditional bitmask-based encoding and prefix-based Huffman encoding as well as a new dictionary selection technique based on a non-greedy algorithm. The combination of these two new methods reduces the compression ratio by 9-20% and performs well with small dictionary sizes.