hi everybody
well at least it works in theory;
here's the topic :
any given text file usually gets compressed to 40% of original size;
a given text file uses approximately 32 characters;
it is easy to tranform any binary file to a text file ( that is to say it uses 32 different values ) ;
for this we use a second file which will indicate what group of 32 characters we refer to
7 for a value between 224 et 255
6 pour une valeur comprise entre 192 et 223
5 pour une valeur comprise entre 160 et 191
4 pour une valeur comprise entre 128 et 159
3 pour une valeur comprise entre 96 et 127
2 pour une valeur comprise entre 64 et 95
1 pour une valeur comprise entre 32 et 63
0 pour une valeur comprise entre 0 et 31
ok.
so this file holds 8 different values
each value can be coded with 3 bits , for a total of 3/8 = 37.5 of the original file
let's take a file of 100ko
as mentioned earlier, a text file is usually reduced to 40% of original size
our output file will weight 40%+ 37.5% = 77.5%
where is the error ??