diff options
Diffstat (limited to 'xdelta3/www')
-rwxr-xr-x | xdelta3/www/xdelta3-api-guide.html | 212 | ||||
-rwxr-xr-x | xdelta3/www/xdelta3-cmdline.html | 167 | ||||
-rwxr-xr-x | xdelta3/www/xdelta3.css | 69 | ||||
-rwxr-xr-x | xdelta3/www/xdelta3.html | 89 |
4 files changed, 0 insertions, 537 deletions
diff --git a/xdelta3/www/xdelta3-api-guide.html b/xdelta3/www/xdelta3-api-guide.html deleted file mode 100755 index b3513ea..0000000 --- a/xdelta3/www/xdelta3-api-guide.html +++ /dev/null | |||
@@ -1,212 +0,0 @@ | |||
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
2 | <html> | ||
3 | <head> | ||
4 | <title>Xdelta3 API guide (BETA)</title> | ||
5 | <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> | ||
6 | <link rel="stylesheet" type="text/css" href="xdelta3.css"/> | ||
7 | </head> | ||
8 | <body> | ||
9 | |||
10 | <!-- $Format: "$WWWLeftNavBar$" $ --!> | ||
11 | <table cellpadding="20px" width=700> <tr> <td class="leftbdr" valign=top height=600 width=100> <div class="leftbody"> <h1>Xdelta</h1> <a href="xdelta3.html">overview</a><br> <a href="xdelta3-cmdline.html">command line</a><br> <a href="xdelta3-api-guide.html">api guide</a><br> <br><a href="http://xdelta.org">xdelta.org</a></h2> </div> </td> <td valign=top width=500> | ||
12 | |||
13 | |||
14 | <!-- Copyright (C) 2003 and onward. Joshua P. MacDonald --!> | ||
15 | |||
16 | <h1>api guide</h1> | ||
17 | |||
18 | <p>This guide intends to give you a quick start to the Xdelta3 programming | ||
19 | interface. This is not a complete reference, the comments inside source file | ||
20 | <code>xdelta3.h</code> and the command-line application, | ||
21 | <code>xdelta3-main.h</code> offer more complete information.</p> | ||
22 | |||
23 | <p>Have you read the <a href="xdelta3-cmdline.html">command-line interface</a>?</p> | ||
24 | |||
25 | <h1>stream interface</h1> | ||
26 | |||
27 | <p> | ||
28 | To begin with, there are three external structures, only two of which are | ||
29 | discussed here. The <code>xd3_stream</code> struct plays the main role, one | ||
30 | of these contains the state necessary to encode or decode one stream of data. | ||
31 | An <code>xd3_source</code> struct maintains state about the (optional) source | ||
32 | file, against which differences are computed. The third structure, | ||
33 | <code>xd3_config</code> deals with configuring various encoder parameters.</p> | ||
34 | |||
35 | <p> | ||
36 | At a glance, the interface resembles Zlib. The program puts data in, which | ||
37 | the xd3_stream consumes. After computing over the data, the xd3_stream in | ||
38 | turn generates output for the application to consume, or it requests more | ||
39 | input. The xd3_stream also issues requests to the application to read a block | ||
40 | of source data. The request to read a source block may be handled in one of | ||
41 | two ways, according to application preference. If a <code>xd3_getblk</code> | ||
42 | callback function is provided, the application handler will be called from | ||
43 | within the library, suspending computation until the request completes. If no | ||
44 | callback function is provided the library returns a special code | ||
45 | (XD3_GETSRCBLK), allowing the application to issue the request and resume | ||
46 | computation whenever it likes. In both cases, the xd3_source struct contains | ||
47 | the requested block number and a place to store the result.</p> | ||
48 | |||
49 | <h1>setup</h1> | ||
50 | <p>The code to declare and initialize the xd3_stream:</p> | ||
51 | <div class="example"> | ||
52 | <pre> | ||
53 | int ret; | ||
54 | xd3_stream stream; | ||
55 | xd3_config config; | ||
56 | |||
57 | xd3_init_config (&config, 0 /* flags */); | ||
58 | config.winsize = 32768; | ||
59 | ret = xd3_config_stream (&stream, &config); | ||
60 | |||
61 | if (ret != 0) { /* error */ } | ||
62 | </pre> | ||
63 | </div> | ||
64 | |||
65 | <p> | ||
66 | <code>xd3_init_config()</code> initializes the <code>xd3_config</code> struct | ||
67 | with default values. Many settings remain undocumented in the beta release. | ||
68 | The most relevant setting, <code>xd3_config.winsize</code>, sets the encoder | ||
69 | window size. The encoder allocates a buffer of this size if the program | ||
70 | supplies input in smaller units (unless the <code>XD3_FLUSH</code> flag is | ||
71 | set). <code>xd3_config_stream()</code> initializes the <code>xd3_stream</code> | ||
72 | object with the supplied configuration. | ||
73 | </p> | ||
74 | |||
75 | <h1>setting the source</h1> | ||
76 | <p> | ||
77 | The stream is ready for input at this point, though for encoding the source | ||
78 | data must be supplied now. To declare an initialize the xd3_source:</p> | ||
79 | |||
80 | <div class="example"> | ||
81 | <pre> | ||
82 | xd3_source source; | ||
83 | void *IO_handle = ...; | ||
84 | |||
85 | source.name = "..."; | ||
86 | source.size = file_size; | ||
87 | source.ioh= IO_handle; | ||
88 | source.blksize= 32768; | ||
89 | source.curblkno = (xoff_t) -1; | ||
90 | source.curblk = NULL; | ||
91 | |||
92 | ret = xd3_set_source (&stream, &source); | ||
93 | |||
94 | if (ret != 0) { /* error */ } | ||
95 | </pre> | ||
96 | </div> | ||
97 | |||
98 | <p> | ||
99 | The decoder sets source data in the same manner, but it may delay this step | ||
100 | until the application header has been received (<code>XD3_GOTHEADER</code>). | ||
101 | The application can also check whether source data is required for decoding | ||
102 | with the <code>xd3_decoder_needs_source()</code>.</p> | ||
103 | |||
104 | <p> | ||
105 | <code>xd3_source.blksize</code> determines the block size used for requesting | ||
106 | source blocks. If the first source block (or the entire source) is already in | ||
107 | memory, set <code>curblkno</code> to 0 and <code>curblk</code> to that block | ||
108 | of data.</p> | ||
109 | |||
110 | <h1>input/output loop</h1> | ||
111 | |||
112 | <p>The stream is now ready for input, which the application provides by | ||
113 | calling <code>xd3_avail_input()</code>. The application initiates | ||
114 | encoding or decoding at this point by calling one of two functions:</p> | ||
115 | |||
116 | <div class="example"> | ||
117 | <pre> | ||
118 | int xd3_encode_input (xd3_stream *stream) | ||
119 | int xd3_decode_input (xd3_stream *stream) | ||
120 | </pre> | ||
121 | </div> | ||
122 | |||
123 | <p>Unless there is an error, these routines return one of six result | ||
124 | codes which the application must handle. In many cases, all or most | ||
125 | of the handler code is shared between encoding and decoding. The | ||
126 | codes are:</p> | ||
127 | |||
128 | <ul> | ||
129 | <li> <code>XD3_INPUT</code>: The stream is ready for (or requires) more input. The | ||
130 | application should call xd3_avail_input when (if) more data is | ||
131 | available. | ||
132 | |||
133 | <li> <code>XD3_OUTPUT</code>: The stream has pending output. The application | ||
134 | should write or otherwise consume the block of data found in the | ||
135 | xd3_stream fields <code>next_out</code> and <code>avail_out</code>, | ||
136 | then call <code>xd3_consume_output</code>. | ||
137 | |||
138 | <li> <code>XD3_GETSRCBLK</code>: The stream is requesting a source block be read, | ||
139 | as described above. This is only ever returned if the xd3_getblk | ||
140 | callback was not provided. | ||
141 | |||
142 | <li> <code>XD3_GOTHEADER</code>: This decoder-specific code indicates that the | ||
143 | first VCDIFF window header has been received. This gives the | ||
144 | application a chance to inspect the application header before | ||
145 | encoding the first window. | ||
146 | |||
147 | <li> <code>XD3_WINSTART</code>: This is returned by both encoder and decoder prior to | ||
148 | processing a window. For encoding, this code is returned once there is enough | ||
149 | available input. For decoding, this is returned following each window header | ||
150 | (except the first, when XD3_GOTHEADER is returned instead). | ||
151 | |||
152 | <li> <code>XD3_WINFINISH</code>: This is called when the output from a single | ||
153 | window has been fully consumed. | ||
154 | </ul> | ||
155 | |||
156 | <p>An application could be structured something like this:</p> | ||
157 | |||
158 | <div class="example"> | ||
159 | <pre> | ||
160 | do { | ||
161 | read (&indata, &insize); | ||
162 | if (reached_EOF) { | ||
163 | xd3_set_flags (&stream, XD3_FLUSH); | ||
164 | } | ||
165 | xd3_avail_input (&stream, indata, insize); | ||
166 | process: | ||
167 | ret = xd3_xxcode_input (&stream); | ||
168 | switch (ret) { | ||
169 | case XD3_INPUT: | ||
170 | continue; | ||
171 | case XD3_OUTPUT: | ||
172 | /* write data */ | ||
173 | goto process; | ||
174 | case XD3_GETSRCBLK: | ||
175 | /* set source block */ | ||
176 | goto process; | ||
177 | case XD3_GOTHEADER: | ||
178 | case XD3_WINSTART: | ||
179 | case XD3_WINFINISH: | ||
180 | /* no action necessary */ | ||
181 | goto process; | ||
182 | default: | ||
183 | /* error */ | ||
184 | } | ||
185 | } while (! reached_EOF); | ||
186 | </pre> | ||
187 | </div> | ||
188 | |||
189 | <p> | ||
190 | All that remains is to close the stream and free its resources. The | ||
191 | <code>xd3_close_stream()</code> checks several error conditions but otherwise | ||
192 | involves no input or output. The <code>xd3_free_stream()</code> routine frees | ||
193 | all memory allocated by the stream.</p> | ||
194 | |||
195 | <h1>misc</h1> | ||
196 | |||
197 | <p> | ||
198 | There are two convenience functions for encoding to and decoding from | ||
199 | in-memory buffers. See the <code>xd3_encode_completely</code> and | ||
200 | <code>xd3_decode_completely</code> interfaces.</p> | ||
201 | |||
202 | <p> | ||
203 | There are two routines to get and set the application header. When | ||
204 | encoding, sthe application header must be set before the first | ||
205 | <code>XD3_WINSTART</code>. When decoding, the application header is available | ||
206 | after after the first <code>XD3_GOTHEADER</code>.</p> | ||
207 | |||
208 | </td> | ||
209 | </tr> | ||
210 | </table> | ||
211 | </body> | ||
212 | </html> | ||
diff --git a/xdelta3/www/xdelta3-cmdline.html b/xdelta3/www/xdelta3-cmdline.html deleted file mode 100755 index e5203a4..0000000 --- a/xdelta3/www/xdelta3-cmdline.html +++ /dev/null | |||
@@ -1,167 +0,0 @@ | |||
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
2 | <html> | ||
3 | <head> | ||
4 | <title>Xdelta3 command-line guide (BETA)</title> | ||
5 | <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> | ||
6 | <link rel="stylesheet" type="text/css" href="xdelta3.css"/> | ||
7 | </head> | ||
8 | <body> | ||
9 | |||
10 | <!-- $Format: "$WWWLeftNavBar$" $ --!> | ||
11 | <table cellpadding="20px" width=700> <tr> <td class="leftbdr" valign=top height=600 width=100> <div class="leftbody"> <h1>Xdelta</h1> <a href="xdelta3.html">overview</a><br> <a href="xdelta3-cmdline.html">command line</a><br> <a href="xdelta3-api-guide.html">api guide</a><br> <br><a href="http://xdelta.org">xdelta.org</a></h2> </div> </td> <td valign=top width=500> | ||
12 | |||
13 | |||
14 | <!-- Copyright (C) 2003 and onward. Joshua P. MacDonald --!> | ||
15 | |||
16 | <h1>command-line guide</h1> | ||
17 | |||
18 | <code>xdelta3</code> can be run with syntax familiar but not similar to gzip; | ||
19 | it requires you to specify the output file in most cases, rather than applying | ||
20 | any default filename extensions. These are cases that resemble gzip:<p> | ||
21 | |||
22 | <div class="example"> | ||
23 | <pre> | ||
24 | xdelta3 -c file_to_compress > delta_file | ||
25 | xdelta3 -dc delta_file > file_uncompressed | ||
26 | </pre> | ||
27 | </div> | ||
28 | <p> | ||
29 | |||
30 | The <code>-c</code> option says to write to the standard output. The | ||
31 | <code>-d</code> option says to decode. The default action is to encode (also | ||
32 | specified by <code>-e</code>). <code>xdelta3</code> also supports long | ||
33 | command names, these two commands are equivalent to the ones abvove:<p> | ||
34 | |||
35 | <div class="example"> | ||
36 | <pre> | ||
37 | xdelta3 encode file_to_compress > delta_file | ||
38 | xdelta3 decode delta_file > file_uncompressed | ||
39 | </pre> | ||
40 | </div> | ||
41 | <p> | ||
42 | |||
43 | <code>xdelta3</code> has the notion of a default filename for decoding. If | ||
44 | you specified a file name during the encode step, it is used as the default | ||
45 | for decoding. The <code>-s</code> option specifies a <em>source file</em> for | ||
46 | delta-compression.<p> | ||
47 | |||
48 | <div class="example"> | ||
49 | <pre> | ||
50 | xdelta3 -s source_file target_file delta_file | ||
51 | xdelta3 -d delta_file | ||
52 | </pre> | ||
53 | </div> | ||
54 | <p> | ||
55 | |||
56 | The second line above fills in "source_file" and "target_file" as the input | ||
57 | and output filenames. Without the <code>-f</code> option, | ||
58 | <code>xdelta3</code> will not overwrite an existing file. When there are no | ||
59 | default filenames (e.g., in decode), standard input and standard output are | ||
60 | used. In the example below, the default source filename is applied in | ||
61 | decoding. | ||
62 | <p> | ||
63 | |||
64 | <div class="example"> | ||
65 | <pre> | ||
66 | cat target_file | xdelta3 -s source_file > delta_file | ||
67 | xdelta3 -d < delta_file > target_file.1 | ||
68 | </pre> | ||
69 | </div> | ||
70 | <p> | ||
71 | |||
72 | <code>xdelta3</code> recognizes externally compressed inputs, so the following | ||
73 | command produces the expected results:<p> | ||
74 | |||
75 | <div class="example"> | ||
76 | <pre> | ||
77 | xdelta3 -s beta2.tar.gz beta3.tar.gz beta3.tar.gz.xd | ||
78 | xdelta3 -ds beta2.tar.gz beta3.tar.gz.xd beta3.tar.gz.1 | ||
79 | </pre> | ||
80 | </div> | ||
81 | <p> | ||
82 | |||
83 | You can avoid the intermediate file and use <code>xdelta3</code> together | ||
84 | with a <code>tar</code>-pipeline. | ||
85 | |||
86 | <div class="example"> | ||
87 | <pre> | ||
88 | tar -cf - beta3 | xdelta3 -s beta2.tar > beta3.tar.xd | ||
89 | xdelta3 -d beta3.tar.xd | tar -xf - | ||
90 | </pre> | ||
91 | </div> | ||
92 | <p> | ||
93 | |||
94 | <code>xdelta</code> can print various information about a compressed file with | ||
95 | the "printhdr" command. The "printhdrs" command prints information about each | ||
96 | <em>window</em> of the encoding. The "printdelta" command prints the actual | ||
97 | encoding for each window, in human-readable format.<p> | ||
98 | |||
99 | <div class="example"> | ||
100 | <pre> | ||
101 | # xdelta3 printdelta delta_file | ||
102 | VCDIFF version: 0 | ||
103 | VCDIFF header size: 5 | ||
104 | VCDIFF header indicator: none | ||
105 | VCDIFF secondary compressor: none | ||
106 | VCDIFF window number: 0 | ||
107 | VCDIFF window indicator: VCD_SOURCE VCD_ADLER32 | ||
108 | VCDIFF adler32 checksum: 48BFADB6 | ||
109 | VCDIFF copy window length: 2813 | ||
110 | VCDIFF copy window offset: 0 | ||
111 | VCDIFF delta encoding length: 93 | ||
112 | VCDIFF target window length: 2903 | ||
113 | VCDIFF data section length: 72 | ||
114 | VCDIFF inst section length: 8 | ||
115 | VCDIFF addr section length: 3 | ||
116 | Offset Code Type1 Size1 @Addr1 + Type2 Size2 @Addr2 | ||
117 | 000000 019 CPY_0 1535 @0 | ||
118 | 001535 001 ADD 72 | ||
119 | 001607 019 CPY_0 1296 @1517 | ||
120 | </pre> | ||
121 | </div> | ||
122 | <br> | ||
123 | <p> | ||
124 | |||
125 | |||
126 | <h1>xdelta3 -h</h1> | ||
127 | |||
128 | <pre> | ||
129 | usage: xdelta3 [command/options] [input [output]] | ||
130 | special command names: | ||
131 | config prints xdelta3 configuration | ||
132 | decode decompress the input | ||
133 | encode compress the input | ||
134 | test run the builtin tests | ||
135 | special commands for VCDIFF inputs: | ||
136 | printdelta print information about the entire delta | ||
137 | printhdr print information about the first window | ||
138 | printhdrs print information about all windows | ||
139 | standard options: | ||
140 | -0 .. -9 compression level | ||
141 | -c use stdout | ||
142 | -d decompress | ||
143 | -e compress | ||
144 | -f force overwrite | ||
145 | -h show help | ||
146 | -q be quiet | ||
147 | -v be verbose (max 2) | ||
148 | -V show version | ||
149 | memory options: | ||
150 | -B blksize source file block size | ||
151 | -M memsize memory budget for hash tables | ||
152 | -W winsize input window buffer size | ||
153 | compression options: | ||
154 | -s source source file to copy from (if any) | ||
155 | -S [djw|fgk] enable/disable secondary compression | ||
156 | -N disable small string-matching compression | ||
157 | -D disable external decompression (encode/decode) | ||
158 | -R disable external recompression (decode) | ||
159 | </pre> | ||
160 | <p> | ||
161 | |||
162 | </td> | ||
163 | </tr> | ||
164 | </table> | ||
165 | |||
166 | </body> | ||
167 | </html> | ||
diff --git a/xdelta3/www/xdelta3.css b/xdelta3/www/xdelta3.css deleted file mode 100755 index 269b1c9..0000000 --- a/xdelta3/www/xdelta3.css +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
1 | body { | ||
2 | margin-top: 15px; | ||
3 | margin-left: 15px; | ||
4 | background-color:#b0b0b0; | ||
5 | color:#204080; | ||
6 | font-family: serif; | ||
7 | word-spacing: 0.5pt; | ||
8 | text-indent: 0pt; | ||
9 | } | ||
10 | |||
11 | A:visited { | ||
12 | color: #204080; | ||
13 | } | ||
14 | A:link { | ||
15 | color: #102040; | ||
16 | } | ||
17 | h1 { | ||
18 | color: #103060; | ||
19 | font-size: 150%; | ||
20 | } | ||
21 | |||
22 | h2 { | ||
23 | color: #103060; | ||
24 | font-size: 80%; | ||
25 | } | ||
26 | |||
27 | code, pre { | ||
28 | font-family: monospace; | ||
29 | } | ||
30 | |||
31 | pre { | ||
32 | color: #102040; | ||
33 | } | ||
34 | |||
35 | code { | ||
36 | color:#0060c0; | ||
37 | } | ||
38 | |||
39 | .example { | ||
40 | margin-right: 20px; | ||
41 | margin-left: 20px; | ||
42 | |||
43 | padding-left: 20px; | ||
44 | padding-right: 20px; | ||
45 | padding-top: 0px; | ||
46 | padding-bottom: 0px; | ||
47 | |||
48 | background-color: #808080; | ||
49 | border-style: solid; | ||
50 | border-width: 1px; | ||
51 | border-color: #000000; | ||
52 | } | ||
53 | |||
54 | .leftbdr { | ||
55 | font-family: sans-serif; | ||
56 | color: #103060; | ||
57 | background-color: #606060; | ||
58 | border-style: solid; | ||
59 | border-width: 1px; | ||
60 | border-color: #000000; | ||
61 | } | ||
62 | .leftbody A:visited { | ||
63 | color: #102040; | ||
64 | text-decoration: none; | ||
65 | } | ||
66 | .leftbody A:link { | ||
67 | color: #102040; | ||
68 | text-decoration: none; | ||
69 | } | ||
diff --git a/xdelta3/www/xdelta3.html b/xdelta3/www/xdelta3.html deleted file mode 100755 index 3bddfd9..0000000 --- a/xdelta3/www/xdelta3.html +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
2 | <html> | ||
3 | <head> | ||
4 | <title>Xdelta3 delta compression library (BETA)</title> | ||
5 | <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> | ||
6 | <link rel="stylesheet" type="text/css" href="xdelta3.css"/> | ||
7 | </head> | ||
8 | <body> | ||
9 | |||
10 | <!-- $Format: "$WWWLeftNavBar$" $ --!> | ||
11 | <table cellpadding="20px" width=700> <tr> <td class="leftbdr" valign=top height=600 width=100> <div class="leftbody"> <h1>Xdelta</h1> <a href="xdelta3.html">overview</a><br> <a href="xdelta3-cmdline.html">command line</a><br> <a href="xdelta3-api-guide.html">api guide</a><br> <br><a href="http://xdelta.org">xdelta.org</a></h2> </div> </td> <td valign=top width=500> | ||
12 | |||
13 | <!-- Copyright (C) 2003 and onward. Joshua P. MacDonald --!> | ||
14 | |||
15 | <h1>version three?</h1> | ||
16 | |||
17 | Xdelta3 is the third and latest release of Xdelta, which is a set of tools and | ||
18 | APIs for reading and writing compressed <em>deltas</em>. Deltas encode the | ||
19 | differences between two versions of a document. This release features a | ||
20 | completely new compression engine, several algorithmic improvements, a fully | ||
21 | programmable interface modelled after zlib, in addition to a command-line | ||
22 | utility, use of the RFC3284 (VCDIFF) encoding, a python extension, and now | ||
23 | 64-bit support.<p> | ||
24 | |||
25 | Xdelta3 is <em>tiny</em>. A minimal, fully functional VCDIFF decoder library | ||
26 | pipes in at 16KB. The command-line utility complete with encoder/decoder | ||
27 | tools, external compression support, and the <code>djw</code> secondary | ||
28 | compression routines, is just under 60KB, slightly larger than a | ||
29 | <code>gzip</code> executable.<p> | ||
30 | |||
31 | Xdelta3 has few dependencies because it's capable of stand-alone file | ||
32 | compression (i.e., what zlib and gzip do). The stand-alone compression of | ||
33 | Xdelta3/VCDIFF is 10-20% worse than <code>gzip</code>, you may view this as | ||
34 | paying for the convenience-cost of having a single encoding, tool, and api | ||
35 | designed to do both <em>data-compression</em> and <em>differencing</em> at | ||
36 | once.<p> | ||
37 | |||
38 | The Xdelta3 command-line tool, <code>xdelta3</code>, supports several | ||
39 | convenience routines. Delta compression works when the two inputs are | ||
40 | similar, but often we would like to compute the difference between two | ||
41 | compressed documents. <code>xdelta3</code> has (optional) support to | ||
42 | recognize externally compressed inputs and process them correctly. This | ||
43 | support is facilitated, in part, using the VCDIFF <em>application header</em> | ||
44 | field to store <code>xdelta3</code> meta-data, which includes the original | ||
45 | file names (if any) and codes to incidate whether the inputs were externally | ||
46 | compressed. Applications may provide their own application header.<p> | ||
47 | |||
48 | <h1>what are version one and version two?</h1> | ||
49 | |||
50 | Many shortcomings in the Xdelta1.x release are fixed in its replacement, | ||
51 | Xdelta3. Xdelta1 used both a simplistic compression algorithm and a | ||
52 | simplistic encoding. For example, Xdelta1 compresses the entire document at | ||
53 | once and thus uses memory proportional to the input size.<p> | ||
54 | |||
55 | The Xdelta1 compression engine made no attempt to find matching strings | ||
56 | smaller than say 16 or 32 bytes, and the encoding does not attempt to | ||
57 | efficiently encode the <code>COPY</code> and <code>ADD</code> instructions | ||
58 | which constitute a delta. For documents with highly similar data, however, | ||
59 | these techniques degrade performance by a relatively insignificant amount. | ||
60 | (Xdelta1.x compresses the delta with Zlib to improve matters, but this | ||
61 | dependency stinks.)<p> | ||
62 | |||
63 | Despite leaving much to be desired, Xdelta1 showed that you can do well | ||
64 | without great complexity; as it turns out, the particulars of the compression | ||
65 | aengine are a relatively insignificant compared to the difficulty of | ||
66 | programming an application that uses delta-compression. Better solve that | ||
67 | first.<p> | ||
68 | |||
69 | What we want are <em>systems</em> that manage compressed storage and network | ||
70 | communication. The second major release, Xdelta2, addresses these issues. | ||
71 | Xdelta2 features a storage interface -- part database and part file system -- | ||
72 | which allows indexing and labeling compressed documents. The feature set is | ||
73 | similar to RCS. The Xdelta2 interface supports efficient algorithms for | ||
74 | <em>extracting</em> deltas between any pair of versions in storage. The | ||
75 | extraction technique also does not rely on hierarchy or centralizing the | ||
76 | namespace, making the techniques ideal for peer-to-peer communication and | ||
77 | proxy architectures. I am grateful to Mihut Ionescu for implementing the | ||
78 | Xproxy HTTP delta-compressing proxy system based on this interface and | ||
79 | studying the benefits of delta-compression in that context. Xdelta2 stressed | ||
80 | the Xdelta1 compression engine beyond its limits; so Xdelta3 is designed as | ||
81 | the ideal replacement. The Xdelta2 techniques are yet to be ported to the new | ||
82 | implementation.<p> | ||
83 | |||
84 | </td> | ||
85 | </tr> | ||
86 | </table> | ||
87 | |||
88 | </body> | ||
89 | </html> | ||