The request is to realise two programs in C language. The first program will be called ImageDiffCreator, the second one DiffPatch, in what follows.
ImageDiffCreator accepts as input two files: (1) a binary file referred to as [url removed, login to view] in the sequel, and (2) a binary file, new.bin. The program should generate a binary file called [url removed, login to view], which should be one of the input files for the DiffPatch program. ImageDiffCreator should generate the file [url removed, login to view] as the difference between [url removed, login to view] and new.bin. Moreover, [url removed, login to view] should be compressed by the ImageDiffCreator program with an efficiency greater than 50%. There are no limitations for ImageDiffCreator with respect to the software efficiency in terms of the complexity, and hence in terms of execution time and allocated RAM. The maximum dimension of each [url removed, login to view] and [url removed, login to view] is 512k.
DiffPatch should accept as input the file generated by ImageDiffCreator and the file old.bin. DiffPatch should be able to decompress [url removed, login to view] and to rebuild the file new.bin.
Constraints for the DiffPatch program are:
1. DiffPatch should work with no more RAM than the sum of the [url removed, login to view] size + 10kbyte. The decompression algorithm should serialize the results (one block at once), and it should write the partial blocks on the disk.
2. In DiffPatch there should not be RAM dynamic allocations. Namely, the [url removed, login to view] file should be loaded in a static vector of char and the working RAM for partial results should also be a static vector.
3. The decompression algorithm should work with an extra vector of maximum size (approx.) 10k.
There are no limitations to the complexity of the algorithm that determines the execution time.
The result should be similar to the project realised by Colin Percival ([url removed, login to view]), but the patch program should be lighter on the RAM (another compress algorithm can be used as an alternative to this one).
The test on both programs will be run on Windows with Ms Visual Studio