Thwart LZMA2 compression Goal

Create a program or pair of programs that collectively disrupt and fix files with the intent of preventing LZMA2 from working effectively.  The disrupt and fix routines must be reciprocal, so you can recover the original file exactly.

Targets


The collected works of Shakespeare in plain UTF-8 (5,589,891 bytes)
Wikimedia Commons 2013 Picture of the Year at full resolution (1,659,847 bytes)


Compression Methods


Ubuntu/related: xz -kz5 &lt;infile&gt;
Windows: 7z.exe a -txz -mx5 &lt;outfile&gt; &lt;infile&gt;
Other: Use a LZMA2 compressor with compression level 5 that compresses the works of Shakespeare to 1570550 bytes &pm; 100 bytes.


Scoring; sum of (everything is in bytes, ls -l or dir it):


Program(s) size (whatever it takes collectively to reversibly "break"/fix the file)
Difference in size (absolute) between:


Raw collected works of Shakespeare and your modified (uncompressed) copy.
Raw photo and your modified (uncompressed) copy.

Difference in size or 0, whichever is greater between:


Raw collected works of Shakespeare minus your modified, LZMA2 compressed copy.
Raw photo minus your modified, LZMA2 compressed copy.



Example

Poorly scoring, lazily-golfed, but compliant Python 2.x example:

import sys
x = 7919 if sys.argv[1] == 'b' else -7919
i = bytearray(open(sys.argv[2], 'rb').read())
for n in range(len(i)):
    i[n] = (i[n] + x*n) % 256
o = open(sys.argv[2]+'~', 'wb').write(i)


Running...

$ python break.py b pg100.txt 
$ python break.py f pg100.txt~ 
$ diff -s pg100.txt pg100.txt~~
Files pg100.txt and pg100.txt~~ are identical
$ python break.py b Glühwendel_brennt_durch.jpg 
$ python break.py f Glühwendel_brennt_durch.jpg~
$ diff -s Glühwendel_brennt_durch.jpg Glühwendel_brennt_durch.jpg~~
Files Glühwendel_brennt_durch.jpg and Glühwendel_brennt_durch.jpg~~ are identical
$ xz -kz5 pg100.txt~
$ xz -kz5 Glühwendel_brennt_durch.jpg~
$ ls -ln
-rw-rw-r-- 1 2092 2092     194 May 23 17:37 break.py
-rw-rw-r-- 1 2092 2092 1659874 May 23 16:20 Glühwendel_brennt_durch.jpg
-rw-rw-r-- 1 2092 2092 1659874 May 23 17:39 Glühwendel_brennt_durch.jpg~
-rw-rw-r-- 1 2092 2092 1659874 May 23 17:39 Glühwendel_brennt_durch.jpg~~
-rw-rw-r-- 1 2092 2092 1646556 May 23 17:39 Glühwendel_brennt_durch.jpg~.xz
-rw-rw-r-- 1 2092 2092 5589891 May 23 17:24 pg100.txt
-rw-rw-r-- 1 2092 2092 5589891 May 23 17:39 pg100.txt~
-rw-rw-r-- 1 2092 2092 5589891 May 23 17:39 pg100.txt~~
-rw-rw-r-- 1 2092 2092 3014136 May 23 17:39 pg100.txt~.xz


Score


= 194 + abs(5589891 &minus; 5589891) + max(5589891 &minus; 3014136, 0) + abs(1659874 &minus; 1659874) + max(1659874 &minus; 1646556, 0)
= 194 + 0 + 2575755 + 0 + 13318
2,589,267 bytes.  Bad, but doing nothing to the files yields a score of 4,635,153 bytes.



  Clarification
  
  This is golf, so you are trying to minimize your score.  I'm not sure if the comments are point out a legitimate hole in my scoring or if they are because I made it too complicated.  In any case, you want the SMALLEST:
  
  
  source code
  difference between the uncompressed modified file and original file (e.g. if you modify it by appending a trillion 0's on the end, your score just went up a trillion bytes)
  difference between the compressed modified file and original file (e.g. the more incompressible the files become, the higher your score).  A perfectly incompressible file that grows slightly or not at all will score 0.
Python, score = 120

import sys,hashlib
i=0
for c in sys.stdin.read():sys.stdout.write(chr(ord(c)^ord(hashlib.md5(str(i)).digest()[0])));i+=1


Makes a one-time pad using md5 in counter mode.  xors the file with it.  This has the advantage that the original and disrupted files are the same size, and that the disruptor and fixer are the same program.

The compressed disrupted files are larger than the originals.