ReplicaNet and RNLobby
1
|
#include <Patcher.h>
Public Member Functions | |
int | GeneratePatch (const char *sourcePath, const char *newPath, const char *patchPath, const size_t level=5) |
bool | PatchFile (const char *sourcePath, const char *patchPath, const char *destinationPath) |
virtual bool | CallbackScanning (const size_t filePos, const size_t fileMax) |
This class generates minimal patches for binary files and also patches files to produce new versions of those files. No checking of file integrity is carried out before a patch is applied because this is a file version problem which is the domain of another set of support classes.
|
virtual |
A virtual callback that is triggered when the scanning status is updated.
int GeneratePatch | ( | const char * | sourcePath, |
const char * | newPath, | ||
const char * | patchPath, | ||
const size_t | level = 5 |
||
) |
Generates a patch from sourcePath compared with newPath and stores the result in patchPath.
sourcePath | The original file path. |
newPath | The new file path. |
patchPath | The destination file path for the patch file. |
level | The compression level to use. 10 gives the best compression but is slow and uses more memory. 1 is fast, uses less memory but does not compress as well. The default is 5 giving reasonable performance. |
bool PatchFile | ( | const char * | sourcePath, |
const char * | patchPath, | ||
const char * | destinationPath | ||
) |
Combines a file from sourcePath with a patch file from patchPath and stores the resultant file in destinationPath.
sourcePath | The original file path. |
patchPath | The patch file path. |
destinationPath | The destination file path for the combined file. |