Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Michael Barr <b@rr-dav.id.au>2012-12-01 07:50:20 +0400
committerDavid Michael Barr <b@rr-dav.id.au>2012-12-01 07:50:45 +0400
commitd1b6ea8ad14f41b87026ab407005e887c4ff6b68 (patch)
treea9ae2a2318683ea281d1822e8a0a4061d9489570 /src/delta-apply.h
parentf1e5c506b20bcc6bed3bbbf64f1f6b79be44316b (diff)
delta-apply: add git__delta_read_header
Diffstat (limited to 'src/delta-apply.h')
-rw-r--r--src/delta-apply.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/delta-apply.h b/src/delta-apply.h
index 66fa76d43..9aea4ac9f 100644
--- a/src/delta-apply.h
+++ b/src/delta-apply.h
@@ -30,4 +30,21 @@ extern int git__delta_apply(
const unsigned char *delta,
size_t delta_len);
+/**
+ * Read the header of a git binary delta.
+ *
+ * @param delta the delta to execute copy/insert instructions from.
+ * @param delta_len total number of bytes in the delta.
+ * @param base_sz pointer to store the base size field.
+ * @param res_sz pointer to store the result size field.
+ * @return
+ * - 0 on a successful decoding the header.
+ * - GIT_ERROR if the delta is corrupt.
+ */
+extern int git__delta_read_header(
+ const unsigned char *delta,
+ size_t delta_len,
+ size_t *base_sz,
+ size_t *res_sz);
+
#endif