DIGIT-ARC read-only archive · snapshot: July 23, 2026

RLE Encoding And Decoding using C..plz help.

3 posts · originally from https://geek.digit.in/community/threads/rle-encoding-and-decoding-using-c-plz-help.77645/

G
garv84 Original post #1
Jan 7, 2008 at 9:09 PM
Hi Guys its urgent have a look..

Run length encoding is a compression technique that takes advantage of repeated consecutive digits. Encoding involves putting a character followed by count.
Example input: 123334455555AAA
Output for above input: 1\12\13\34\25\5A\3 (1 is appearing once, 2 is appearing twice,k 3 is appearing 3 times, 4 is appearing twice, 5 is appearing 5 times, A is appearing 3 times. \ represents the ESCAPE sequence. \1 means ASCII value 1)
If a digit is repeated more than 255 times, it should be split into two parts as in following example:
Example input:1 repated 257 times
Output for above input:1\2551\2
A decoder does the reverse.

Write a C program that encodes in RLE format and also decodes RLE format to restore to the original file. (When a file is encoded and decoded, the original file should be restored)



ne reply mail me at gaurav.dutta84@gmail.com..its urgent..plzz help.
CadCrazy
Jan 9, 2008 at 11:47 AM
Double post. *www.thinkdigit.com/forum/showthread.php?t=77647

reported
M
Jan 9, 2008 at 11:51 AM
you mean triple post?