I
I
ixaaxar2020-01-23 22:03:16
Data compression
ixaaxar, 2020-01-23 22:03:16

What is the compression algorithm?

Help on a format of a data stream to define a data compression method.
The data stream contains a series of blocks (1 flag bit and data).
Block starts with flag
1 - block will contain raw data (8 bits)
0 - block will refer to existing blocks with offset and block length (12 bits for offset and 4 bits for length)
Sample data flow with flag 1
1 // flag
01001110 N // data
1 // flag
01100001 a // data
1 // flag
01101101 m // data
1 // flag
01100101 e // data Data
flow example with flag 0
0 // flag
000000000111 // offset
0000 // length

Answer the question

In order to leave comments, you need to log in

1 answer(s)
1
15432, 2020-01-24
@15432

It's a very simple algorithm. Similar to LZ77
https://ru.m.wikipedia.org/wiki/LZ77

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question