summaryrefslogtreecommitdiff
path: root/xdelta3/xdelta3.h
diff options
context:
space:
mode:
authorjosh.macdonald <jmacd@users.noreply.github.com>2009-10-25 18:19:30 +0000
committerjosh.macdonald <jmacd@users.noreply.github.com>2009-10-25 18:19:30 +0000
commitdcb74c33f7d14d6fc9f590c9c551722498cb11ce (patch)
treea38cd4ce20034530ac6188dfa8f3e955cda89d33 /xdelta3/xdelta3.h
parentf7f72abe8fe48766b545df3949b09fe25f900aee (diff)
Adds xd3_set_source_and_size.
Diffstat (limited to 'xdelta3/xdelta3.h')
-rw-r--r--xdelta3/xdelta3.h17
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);
1160int xd3_set_source (xd3_stream *stream, 1160int 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 */
1176int 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. */
1165void xd3_set_appheader (xd3_stream *stream, 1182void xd3_set_appheader (xd3_stream *stream,