]>
Commit | Line | Data |
---|---|---|
c23841c8 SP |
1 | #ifndef INCLUDE_delta_apply_h__ |
2 | #define INCLUDE_delta_apply_h__ | |
3 | ||
72a3fe42 VM |
4 | #include "odb.h" |
5 | ||
c23841c8 SP |
6 | /** |
7 | * Apply a git binary delta to recover the original content. | |
8 | * | |
9 | * @param out the output buffer to receive the original data. | |
10 | * Only out->data and out->len are populated, as this is | |
11 | * the only information available in the delta. | |
12 | * @param base the base to copy from during copy instructions. | |
13 | * @param base_len number of bytes available at base. | |
14 | * @param delta the delta to execute copy/insert instructions from. | |
15 | * @param delta_len total number of bytes in the delta. | |
16 | * @return | |
17 | * - GIT_SUCCESS on a successful delta unpack. | |
18 | * - GIT_ERROR if the delta is corrupt or doesn't match the base. | |
19 | */ | |
e035685f | 20 | extern int git__delta_apply( |
f49a2e49 | 21 | git_rawobj *out, |
c23841c8 SP |
22 | const unsigned char *base, |
23 | size_t base_len, | |
24 | const unsigned char *delta, | |
25 | size_t delta_len); | |
26 | ||
27 | #endif |