delta.h 775 Bytes
Newer Older
Nicolas Pitre's avatar
Nicolas Pitre committed
1 2 3 4
#ifndef DELTA_H
#define DELTA_H

/* handling of delta buffers */
5 6
extern void *diff_delta(void *from_buf, unsigned long from_size,
			void *to_buf, unsigned long to_size,
7
		        unsigned long *delta_size, unsigned long max_size);
8 9 10
extern void *patch_delta(void *src_buf, unsigned long src_size,
			 void *delta_buf, unsigned long delta_size,
			 unsigned long *dst_size);
Nicolas Pitre's avatar
Nicolas Pitre committed
11 12 13 14

/* handling of delta objects */
struct delta;
struct object_list;
15
extern struct delta *lookup_delta(const unsigned char *sha1);
Nicolas Pitre's avatar
Nicolas Pitre committed
16 17 18 19 20 21
extern int parse_delta_buffer(struct delta *item, void *buffer, unsigned long size);
extern int parse_delta(struct delta *item, unsigned char sha1);
extern int process_deltas(void *src, unsigned long src_size,
			  const char *src_type, struct object_list *delta);

#endif