39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
zRes = blob_buffer(pDelta);
len = delta_create(zOrig, lenOrig, zTarg, lenTarg, zRes);
blob_resize(pDelta, len);
return 0;
}
/*
** COMMAND: test-delta-create
**
** Usage: %fossil test-delta-create FILE1 FILE2 DELTA
**
** Create and output a delta that carries FILE1 into FILE2.
** Store the result in DELTA.
*/
void delta_create_cmd(void){
|
|
|
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
zRes = blob_buffer(pDelta);
len = delta_create(zOrig, lenOrig, zTarg, lenTarg, zRes);
blob_resize(pDelta, len);
return 0;
}
/*
** COMMAND: test-delta-create
**
** Usage: %fossil test-delta-create FILE1 FILE2 DELTA
**
** Create and output a delta that carries FILE1 into FILE2.
** Store the result in DELTA.
*/
void delta_create_cmd(void){
|
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
}
blob_reset(&orig);
blob_reset(&target);
blob_reset(&delta);
}
/*
** COMMAND: test-delta-analyze
**
** Usage: %fossil test-delta-analyze FILE1 FILE2
**
** Create and a delta that carries FILE1 into FILE2. Print the
** number bytes copied and the number of bytes inserted.
*/
void delta_analyze_cmd(void){
|
|
|
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
}
blob_reset(&orig);
blob_reset(&target);
blob_reset(&delta);
}
/*
** COMMAND: test-delta-analyze
**
** Usage: %fossil test-delta-analyze FILE1 FILE2
**
** Create and a delta that carries FILE1 into FILE2. Print the
** number bytes copied and the number of bytes inserted.
*/
void delta_analyze_cmd(void){
|
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
blob_reset(pOriginal);
}
*pTarget = out;
return len;
}
/*
** COMMAND: test-delta-apply
**
** Usage: %fossil test-delta-apply FILE1 DELTA
**
** Apply DELTA to FILE1 and output the result.
*/
void delta_apply_cmd(void){
Blob orig, target, delta;
|
|
|
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
blob_reset(pOriginal);
}
*pTarget = out;
return len;
}
/*
** COMMAND: test-delta-apply
**
** Usage: %fossil test-delta-apply FILE1 DELTA
**
** Apply DELTA to FILE1 and output the result.
*/
void delta_apply_cmd(void){
Blob orig, target, delta;
|
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
|
blob_reset(&orig);
blob_reset(&target);
blob_reset(&delta);
}
/*
** COMMAND: test-delta
**
** Usage: %fossil test-delta FILE1 FILE2
**
** Read two files named on the command-line. Create and apply deltas
** going in both directions. Verify that the original files are
** correctly recovered.
*/
|
|
|
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
|
blob_reset(&orig);
blob_reset(&target);
blob_reset(&delta);
}
/*
** COMMAND: test-delta
**
** Usage: %fossil test-delta FILE1 FILE2
**
** Read two files named on the command-line. Create and apply deltas
** going in both directions. Verify that the original files are
** correctly recovered.
*/
|