4 /* handling of delta buffers */
5 extern void *diff_delta(void *from_buf
, unsigned long from_size
,
6 void *to_buf
, unsigned long to_size
,
7 unsigned long *delta_size
, unsigned long max_size
,
9 extern void *patch_delta(void *src_buf
, unsigned long src_size
,
10 void *delta_buf
, unsigned long delta_size
,
11 unsigned long *dst_size
);
13 /* the smallest possible delta size is 4 bytes */
14 #define DELTA_SIZE_MIN 4
17 * This must be called twice on the delta data buffer, first to get the
18 * expected reference buffer size, and again to get the result buffer size.
20 static inline unsigned long get_delta_hdr_size(const unsigned char **datap
)
22 const unsigned char *data
= *datap
;
24 unsigned long size
= 0;
28 size
|= (cmd
& ~0x80) << i
;