Given a description of the compressed data format, write code that compresses/decompresses files.
First, the compressed format:
A 0 bit followed by eight bits means just copy the eight bits to the output directly.
A 1 bit is followed by a pointer of 12 bits followed by a length encoded in 4 bits. This is to be interpreted as "copy the <length> bytes from <pointer> bytes ago in the output to the current location".
"mahi mahi" can be compressed as:
Original size = 9 bytes, compressed = just under 8 bytes.
You don't need to produce optimal compression (hard), greedy matching is fine. However, we want something that runs as fast as possible, without taking too much code (use your discretion).
The compressor and decompressor should take binary files as input and output. If you're familiar with Lempel-Ziv compressors, this is a simplified LZ77 compressor.
9 freelance font une offre moyenne de $70 pour ce travail
Hi, I am C and Algorithm expert and can surely help you here, Please check your inbox, Thanks
I am a european professional atuomation developer with specialty in machine level programming with C/C++. The task at hand should be very easy for me to do. I am a single european trying to get my foot into the free Plus
i already made lz77 and lzw and huffman comprition alghorhisms. i promise you a clean,simple well documented code.