]>
git.proxmox.com Git - libgit2.git/blob - src/delta-apply.h
2 * Copyright (C) 2009-2011 the libgit2 contributors
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
7 #ifndef INCLUDE_delta_apply_h__
8 #define INCLUDE_delta_apply_h__
13 * Apply a git binary delta to recover the original content.
15 * @param out the output buffer to receive the original data.
16 * Only out->data and out->len are populated, as this is
17 * the only information available in the delta.
18 * @param base the base to copy from during copy instructions.
19 * @param base_len number of bytes available at base.
20 * @param delta the delta to execute copy/insert instructions from.
21 * @param delta_len total number of bytes in the delta.
23 * - GIT_SUCCESS on a successful delta unpack.
24 * - GIT_ERROR if the delta is corrupt or doesn't match the base.
26 extern int git__delta_apply(
28 const unsigned char *base
,
30 const unsigned char *delta
,