Hi, if we take for example 32bits: 1111 1000 0000 1000 0001 1111 1100 0000, how does it become (24bits) 1011 1110 0011 0110 1111 0110 after RLE is applied?
Why/how does 1011 represent the 5 1's at the start of the 32bit number? I'm trying to understand the concept and was trying to figure out how to do it by hand before attempting to write a text compression program.
Why/how does 1011 represent the 5 1's at the start of the 32bit number?
From how it looks, the first three bits of each 4-bit group are the run length (101[2]=5) and the fourth bit is the bit to be repeated (1).
how to do it by hand before attempting to write a text compression program.
RLE is not suitable for text compression. Rather, find sequences of characters that have already occurred previously in the text and encode their position and length.