diff options
Diffstat (limited to 'xdelta3/xdelta3.h')
-rw-r--r-- | xdelta3/xdelta3.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/xdelta3/xdelta3.h b/xdelta3/xdelta3.h index 15b53a6..2a54ce9 100644 --- a/xdelta3/xdelta3.h +++ b/xdelta3/xdelta3.h | |||
@@ -1160,6 +1160,23 @@ void xd3_free_stream (xd3_stream *stream); | |||
1160 | int xd3_set_source (xd3_stream *stream, | 1160 | int xd3_set_source (xd3_stream *stream, |
1161 | xd3_source *source); | 1161 | xd3_source *source); |
1162 | 1162 | ||
1163 | /* If the source size is known, call this instead of xd3_set_source(). | ||
1164 | * to avoid having stream->getblk called (and/or to avoid XD3_GETSRCBLK). | ||
1165 | * | ||
1166 | * Follow these steps: | ||
1167 | xd3_source source; | ||
1168 | memset(&source, 0, sizeof(source)); | ||
1169 | source.blksize = size; | ||
1170 | source.onblk = size; | ||
1171 | source.curblk = buf; | ||
1172 | source.curblkno = 0; | ||
1173 | int ret = xd3_set_source_and_size(&stream, &source, size); | ||
1174 | ... | ||
1175 | */ | ||
1176 | int xd3_set_source_and_size (xd3_stream *stream, | ||
1177 | xd3_source *source, | ||
1178 | xoff_t source_size); | ||
1179 | |||
1163 | /* This should be called before the first call to xd3_encode_input() | 1180 | /* This should be called before the first call to xd3_encode_input() |
1164 | * to include application-specific data in the VCDIFF header. */ | 1181 | * to include application-specific data in the VCDIFF header. */ |
1165 | void xd3_set_appheader (xd3_stream *stream, | 1182 | void xd3_set_appheader (xd3_stream *stream, |