Fixed memory leaks in test suite
[libgit2.git] / src / delta-apply.h
blob498bccdfec1fc223c27c0d84030ff419058e452d
1 #ifndef INCLUDE_delta_apply_h__
2 #define INCLUDE_delta_apply_h__
4 /**
5 * Apply a git binary delta to recover the original content.
7 * @param out the output buffer to receive the original data.
8 * Only out->data and out->len are populated, as this is
9 * the only information available in the delta.
10 * @param base the base to copy from during copy instructions.
11 * @param base_len number of bytes available at base.
12 * @param delta the delta to execute copy/insert instructions from.
13 * @param delta_len total number of bytes in the delta.
14 * @return
15 * - GIT_SUCCESS on a successful delta unpack.
16 * - GIT_ERROR if the delta is corrupt or doesn't match the base.
18 extern int git__delta_apply(
19 git_obj *out,
20 const unsigned char *base,
21 size_t base_len,
22 const unsigned char *delta,
23 size_t delta_len);
25 #endif