Custom LZ77 (almost) compression

Виконано Опубліковано %project.relative_time Оплачується при отриманні
Виконано Оплачується при отриманні

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 bytes from bytes ago in the output to the current location".

For example:

"mahi mahi" can be compressed as:

<

0,' '>

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.

Correction -
'mahi mahi' can be compressed as
< 0, 'm '> < 0, 'a' > < 0, 'h' > < 0,'i' > <0,' '> <1,4,4>

See attached file.

Алгоритм Програмування на С

ID Проекту: #2479558

Про проект

4 заявок(-ки) Дистанційний проект Остання активність Sep 13, 2012

Доручено:

vrts

Clear task. I'd like to write this project.

$30 USD за 1 день
(17 відгуків(-и))
5.1

4 фрілансерів(-и) готові виконати цю роботу у середньому за $43

dobreiiita

Hi, I am C expert and can surely help you here, Thank You

$80 USD за 2 дні(-в)
(123 відгуків(и))
6.2
msabouri

I can easily do this

$30 USD за 2 дні(-в)
(41 відгуків(и))
5.4
avik938

hi..pls chk PM

$30 USD за 3 дні(-в)
(19 відгуків(и))
5.2