[Question]
  [
**Closed**. This question needs [details or clarity](/help/closed-questions). It is not currently accepting answers.
 
 
---
**Want to improve this question?** Add details and clarify the problem by [editing this post](/posts/87444/edit).
Closed 7 years ago.
[Improve this question](/posts/87444/edit) 
For this challenge, you need to compress a diff. **A diff is some data that represents the difference between two strings.** For this challenge, you need to provide one or more programs that can:
1. Input `A` and `B`, and output a diff, `C`
2. Input `A` and `C`, and output `B`
3. Input `B` and `C`, and output `A`
**The goal is to make the diff, `C`, as small as possible.** The diff can be anything: a string, a number, a blob of data. We just care about the size (number of bytes).
I have 50 test cases [that can found on Github](https://gist.github.com/nathanmerrill/125a6e2ae7d9ded3531fedff036cf74b). Each test case consists of two space-separated URLs which point to the 2 files you need to diff. (These test cases originated from PPCG members' Github profiles. Thanks all!)
All three tasks above should take under a minute to run on a reasonably powered computer (for each test case).
Your score is equal to the total size (in bytes) of all 50 diffs, lower is better. Hardcoding diffs in your program is not allowed (I reserve the right to change the test cases to prevent hardcoding). Builtins that produce a diff (like `diffutils`) are not allowed.
  
[Answer]
Is my answer valid?
```
set f [open commits.txt]
while {![eof $f]} {scan [gets $f] %s\ %s a b; puts [string compare $a $b]}
close $f
```
testable on: <http://www.tutorialspoint.com/execute_tcl_online.php?PID=0Bw_CjBb95KQMNmd4QkxvQUFsTnM>
]