diff options
Diffstat (limited to 'xdelta3/xdelta3.h')
-rw-r--r-- | xdelta3/xdelta3.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/xdelta3/xdelta3.h b/xdelta3/xdelta3.h index 6cffbf8..554359d 100644 --- a/xdelta3/xdelta3.h +++ b/xdelta3/xdelta3.h | |||
@@ -280,8 +280,8 @@ typedef struct _xd3_wininfo xd3_wininfo; | |||
280 | * provided as NULL, the stream returns XD3_GETSRCBLK. */ | 280 | * provided as NULL, the stream returns XD3_GETSRCBLK. */ |
281 | 281 | ||
282 | typedef void* (xd3_alloc_func) (void *opaque, | 282 | typedef void* (xd3_alloc_func) (void *opaque, |
283 | usize_t items, | 283 | size_t items, |
284 | usize_t size); | 284 | usize_t size); |
285 | typedef void (xd3_free_func) (void *opaque, | 285 | typedef void (xd3_free_func) (void *opaque, |
286 | void *address); | 286 | void *address); |
287 | 287 | ||
@@ -692,10 +692,6 @@ struct _xd3_config | |||
692 | usize_t iopt_size; /* entries in the | 692 | usize_t iopt_size; /* entries in the |
693 | instruction-optimizing | 693 | instruction-optimizing |
694 | buffer */ | 694 | buffer */ |
695 | usize_t srcwin_maxsz; /* srcwin_size grows by a factor | ||
696 | of 2 when no matches are | ||
697 | found. encoder will not seek | ||
698 | back further than this. */ | ||
699 | 695 | ||
700 | xd3_getblk_func *getblk; /* The three callbacks. */ | 696 | xd3_getblk_func *getblk; /* The three callbacks. */ |
701 | xd3_alloc_func *alloc; | 697 | xd3_alloc_func *alloc; |
@@ -729,6 +725,7 @@ struct _xd3_source | |||
729 | const char *name; /* its name, for debug/print | 725 | const char *name; /* its name, for debug/print |
730 | purposes */ | 726 | purposes */ |
731 | void *ioh; /* opaque handle */ | 727 | void *ioh; /* opaque handle */ |
728 | xoff_t max_winsize; /* maximum visible buffer */ | ||
732 | 729 | ||
733 | /* getblk sets */ | 730 | /* getblk sets */ |
734 | xoff_t curblkno; /* current block number: client | 731 | xoff_t curblkno; /* current block number: client |
@@ -798,7 +795,6 @@ struct _xd3_stream | |||
798 | size mask */ | 795 | size mask */ |
799 | usize_t iopt_size; | 796 | usize_t iopt_size; |
800 | usize_t iopt_unlimited; | 797 | usize_t iopt_unlimited; |
801 | usize_t srcwin_maxsz; | ||
802 | 798 | ||
803 | /* general configuration */ | 799 | /* general configuration */ |
804 | xd3_getblk_func *getblk; /* set nxtblk, nxtblkno to scanblkno */ | 800 | xd3_getblk_func *getblk; /* set nxtblk, nxtblkno to scanblkno */ |
@@ -840,7 +836,7 @@ struct _xd3_stream | |||
840 | * if there is at least one | 836 | * if there is at least one |
841 | * match in the buffer. */ | 837 | * match in the buffer. */ |
842 | 838 | ||
843 | /* SRCWIN: these variables plus srcwin_maxsz above (set by config) */ | 839 | /* SRCWIN */ |
844 | int srcwin_decided; /* boolean: true if srclen and | 840 | int srcwin_decided; /* boolean: true if srclen and |
845 | srcbase have been | 841 | srcbase have been |
846 | decided. */ | 842 | decided. */ |
@@ -1070,11 +1066,11 @@ int xd3_decode_memory (const uint8_t *input, | |||
1070 | * src.curblkno = 0; | 1066 | * src.curblkno = 0; |
1071 | * src.onblk = source_size; | 1067 | * src.onblk = source_size; |
1072 | * src.curblk = source; | 1068 | * src.curblk = source; |
1069 | * src.max_winsize = source_size; | ||
1073 | * xd3_set_source(&stream, &src); | 1070 | * xd3_set_source(&stream, &src); |
1074 | * } | 1071 | * } |
1075 | * | 1072 | * |
1076 | * config.flags = flags; | 1073 | * config.flags = flags; |
1077 | * config.srcwin_maxsz = source_size; | ||
1078 | * config.winsize = input_size; | 1074 | * config.winsize = input_size; |
1079 | * | 1075 | * |
1080 | * ... set smatcher, appheader, encoding-table, compression-level, etc. | 1076 | * ... set smatcher, appheader, encoding-table, compression-level, etc. |