#BrainFuck: 129 (129+0+0+0+0)*
BrainFuck: 129 (129+0+0+0+0)*
random.bf (linefeeds added for readability)
,+[->>>>++[<++++++++[<[<++>-]>>[>>]+>>+[-[->>+<<<[<[<<]< +>]>[>[>>]]]<[>>[-]]>[>[-<<]>[<+<]]+<<]<[>+<-]>>-]<[-<<+ >>]<<.,+[->]>>>]] To create unrandom.bf you need to change the last + in the second line.
Most of the code is based on Daniel B Cristofani's Rule30 based random number generator adapted to add the number to each input and to terminate when there is no more input.
*I've tested the bytes it has processed so far 212992 (processed after 12 hours) and both files turns into a 213064 compressed file. I guess it might be done by the end of the week for know for sure but I don't want to wait with posting. I'll update the score if it's wrong, but keep the solution since Rule30 rocks!
Trivia: Rule 30 was discovered by Stephen Wolfram in 1983 and according to Wikipedia it's used to produce random integers in Mathematica.
Compilation and running:
It uses exponential time and space (iterates over 32 more cells per char processed) so it requires a BrainFuck runtime that has at least 178,876,517 cells to encode the Shakespear file, do not treat non ascii as unicode, has wider than 8 bits cells and uses -1 as eof (to differ between 255 and -1). I usually use others peoples interpreters but this time I need to be a plug and promote my own:
jitbf --eof -1 -b 16 -c 200000000 random.bf < pg100.txt > pg100.txt.ran jitbf --eof -1 -b 16 -c 200000000 random.bf < Glühwendel_brennt_durch.jpg > Glühwendel_brennt_durch.jpg.ran jitfb compiles BrainFuck to optimized C and abuses perl Inline::C to run it. It's bundles with my Extended BrainFuck compiler. With the cell size and width in the argument it will allocate about 400MB.