From 90ab158f92e3449ddec3f01ac034a6e031fb562e Mon Sep 17 00:00:00 2001 From: "josh.macdonald" Date: Sun, 4 Feb 2007 09:37:56 +0000 Subject: Cleanup www (it's on the code.google.com/p/xdelta/wiki/list now). Rekey. --- xdelta3/Makefile | 2 +- xdelta3/setup.py | 2 +- xdelta3/www/xdelta3-api-guide.html | 212 ------------------------------------- xdelta3/www/xdelta3-cmdline.html | 167 ----------------------------- xdelta3/www/xdelta3.css | 69 ------------ xdelta3/www/xdelta3.html | 89 ---------------- xdelta3/xdelta3-main.h | 2 +- xdelta3/xdelta3-regtest.py | 152 ++++++++++---------------- xdelta3/xdelta3.prj | 43 ++++---- 9 files changed, 79 insertions(+), 659 deletions(-) delete mode 100755 xdelta3/www/xdelta3-api-guide.html delete mode 100755 xdelta3/www/xdelta3-cmdline.html delete mode 100755 xdelta3/www/xdelta3.css delete mode 100755 xdelta3/www/xdelta3.html diff --git a/xdelta3/Makefile b/xdelta3/Makefile index 574ff60..b71e24a 100755 --- a/xdelta3/Makefile +++ b/xdelta3/Makefile @@ -38,7 +38,7 @@ EXTRA = Makefile COPYING linkxd3lib.c badcopy.c www \ draft-korn-vcdiff.txt xdelta3.vcproj badcopy.vcproj # $Format: "REL=$Xdelta3Version$" $ -REL=0m +REL=0n RELDIR = xdelta3$(REL) all: xdelta3-debug xdelta3 $(PYTGT) diff --git a/xdelta3/setup.py b/xdelta3/setup.py index ed1e1aa..faee42b 100755 --- a/xdelta3/setup.py +++ b/xdelta3/setup.py @@ -52,7 +52,7 @@ xdelta3_ext = Extension('xdelta3', ]) # $Format: "REL='$Xdelta3Version$'" $ -REL='0m' +REL='0n' # This provides xdelta3.main(), which calls the xdelta3 command-line main() # from python. 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 @@ - - - - Xdelta3 API guide (BETA) - - - - - - - - -
- - - - -

api guide

- -

This guide intends to give you a quick start to the Xdelta3 programming -interface. This is not a complete reference, the comments inside source file -xdelta3.h and the command-line application, -xdelta3-main.h offer more complete information.

- -

Have you read the command-line interface?

- -

stream interface

- -

-To begin with, there are three external structures, only two of which are -discussed here. The xd3_stream struct plays the main role, one -of these contains the state necessary to encode or decode one stream of data. -An xd3_source struct maintains state about the (optional) source -file, against which differences are computed. The third structure, -xd3_config deals with configuring various encoder parameters.

- -

-At a glance, the interface resembles Zlib. The program puts data in, which -the xd3_stream consumes. After computing over the data, the xd3_stream in -turn generates output for the application to consume, or it requests more -input. The xd3_stream also issues requests to the application to read a block -of source data. The request to read a source block may be handled in one of -two ways, according to application preference. If a xd3_getblk -callback function is provided, the application handler will be called from -within the library, suspending computation until the request completes. If no -callback function is provided the library returns a special code -(XD3_GETSRCBLK), allowing the application to issue the request and resume -computation whenever it likes. In both cases, the xd3_source struct contains -the requested block number and a place to store the result.

- -

setup

-

The code to declare and initialize the xd3_stream:

-
-
-int ret;
-xd3_stream stream;
-xd3_config config;
-
-xd3_init_config (&config, 0 /* flags */);
-config.winsize = 32768;
-ret = xd3_config_stream (&stream, &config);
-
-if (ret != 0) { /* error */ }
-
-
- -

-xd3_init_config() initializes the xd3_config struct -with default values. Many settings remain undocumented in the beta release. -The most relevant setting, xd3_config.winsize, sets the encoder -window size. The encoder allocates a buffer of this size if the program -supplies input in smaller units (unless the XD3_FLUSH flag is -set). xd3_config_stream() initializes the xd3_stream -object with the supplied configuration. -

- -

setting the source

-

-The stream is ready for input at this point, though for encoding the source -data must be supplied now. To declare an initialize the xd3_source:

- -
-
-xd3_source source;
-void *IO_handle = ...;
-
-source.name = "...";
-source.size = file_size;
-source.ioh= IO_handle;
-source.blksize= 32768;
-source.curblkno = (xoff_t) -1;
-source.curblk = NULL;
-
-ret = xd3_set_source (&stream, &source);
-
-if (ret != 0) { /* error */ }
-
-
- -

-The decoder sets source data in the same manner, but it may delay this step -until the application header has been received (XD3_GOTHEADER). -The application can also check whether source data is required for decoding -with the xd3_decoder_needs_source().

- -

-xd3_source.blksize determines the block size used for requesting -source blocks. If the first source block (or the entire source) is already in -memory, set curblkno to 0 and curblk to that block -of data.

- -

input/output loop

- -

The stream is now ready for input, which the application provides by -calling xd3_avail_input(). The application initiates -encoding or decoding at this point by calling one of two functions:

- -
-
-int xd3_encode_input (xd3_stream *stream)
-int xd3_decode_input (xd3_stream *stream)
-
-
- -

Unless there is an error, these routines return one of six result -codes which the application must handle. In many cases, all or most -of the handler code is shared between encoding and decoding. The -codes are:

- -
    -
  • XD3_INPUT: The stream is ready for (or requires) more input. The -application should call xd3_avail_input when (if) more data is -available. - -
  • XD3_OUTPUT: The stream has pending output. The application -should write or otherwise consume the block of data found in the -xd3_stream fields next_out and avail_out, -then call xd3_consume_output. - -
  • XD3_GETSRCBLK: The stream is requesting a source block be read, -as described above. This is only ever returned if the xd3_getblk -callback was not provided. - -
  • XD3_GOTHEADER: This decoder-specific code indicates that the -first VCDIFF window header has been received. This gives the -application a chance to inspect the application header before -encoding the first window. - -
  • XD3_WINSTART: This is returned by both encoder and decoder prior to -processing a window. For encoding, this code is returned once there is enough -available input. For decoding, this is returned following each window header -(except the first, when XD3_GOTHEADER is returned instead). - -
  • XD3_WINFINISH: This is called when the output from a single -window has been fully consumed. -
- -

An application could be structured something like this:

- -
-
-do {
-  read (&indata, &insize);
-  if (reached_EOF) {
-    xd3_set_flags (&stream, XD3_FLUSH);
-  }
-  xd3_avail_input (&stream, indata, insize);
-process:
-  ret = xd3_xxcode_input (&stream);
-  switch (ret) {
-  case XD3_INPUT:
-    continue;
-  case XD3_OUTPUT:
-    /* write data */
-    goto process;
-  case XD3_GETSRCBLK:
-    /* set source block */
-    goto process;
-  case XD3_GOTHEADER:
-  case XD3_WINSTART:
-  case XD3_WINFINISH:
-    /* no action necessary */
-    goto process;
-  default:
-    /* error */
-  }
-} while (! reached_EOF);
-
-
- -

-All that remains is to close the stream and free its resources. The -xd3_close_stream() checks several error conditions but otherwise -involves no input or output. The xd3_free_stream() routine frees -all memory allocated by the stream.

- -

misc

- -

-There are two convenience functions for encoding to and decoding from -in-memory buffers. See the xd3_encode_completely and -xd3_decode_completely interfaces.

- -

-There are two routines to get and set the application header. When -encoding, sthe application header must be set before the first -XD3_WINSTART. When decoding, the application header is available -after after the first XD3_GOTHEADER.

- -
- - 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 @@ - - - - Xdelta3 command-line guide (BETA) - - - - - - - - -
- - - - -

command-line guide

- -xdelta3 can be run with syntax familiar but not similar to gzip; -it requires you to specify the output file in most cases, rather than applying -any default filename extensions. These are cases that resemble gzip:

- -

-
-xdelta3 -c file_to_compress > delta_file
-xdelta3 -dc delta_file > file_uncompressed
-
-
-

- -The -c option says to write to the standard output. The --d option says to decode. The default action is to encode (also -specified by -e). xdelta3 also supports long -command names, these two commands are equivalent to the ones abvove:

- -

-
-xdelta3 encode file_to_compress > delta_file
-xdelta3 decode delta_file > file_uncompressed
-
-
-

- -xdelta3 has the notion of a default filename for decoding. If -you specified a file name during the encode step, it is used as the default -for decoding. The -s option specifies a source file for -delta-compression.

- -

-
-xdelta3 -s source_file target_file delta_file
-xdelta3 -d delta_file
-
-
-

- -The second line above fills in "source_file" and "target_file" as the input -and output filenames. Without the -f option, -xdelta3 will not overwrite an existing file. When there are no -default filenames (e.g., in decode), standard input and standard output are -used. In the example below, the default source filename is applied in -decoding. -

- -

-
-cat target_file | xdelta3 -s source_file > delta_file
-xdelta3 -d < delta_file > target_file.1
-
-
-

- -xdelta3 recognizes externally compressed inputs, so the following -command produces the expected results:

- -

-
-xdelta3 -s beta2.tar.gz beta3.tar.gz beta3.tar.gz.xd
-xdelta3 -ds beta2.tar.gz beta3.tar.gz.xd beta3.tar.gz.1
-
-
-

- -You can avoid the intermediate file and use xdelta3 together -with a tar-pipeline. - -

-
-tar -cf - beta3 | xdelta3 -s beta2.tar > beta3.tar.xd
-xdelta3 -d beta3.tar.xd | tar -xf -
-
-
-

- -xdelta can print various information about a compressed file with -the "printhdr" command. The "printhdrs" command prints information about each -window of the encoding. The "printdelta" command prints the actual -encoding for each window, in human-readable format.

- -

-
-# xdelta3 printdelta delta_file
-VCDIFF version:               0
-VCDIFF header size:           5
-VCDIFF header indicator:      none
-VCDIFF secondary compressor:  none
-VCDIFF window number:         0
-VCDIFF window indicator:      VCD_SOURCE VCD_ADLER32 
-VCDIFF adler32 checksum:      48BFADB6
-VCDIFF copy window length:    2813
-VCDIFF copy window offset:    0
-VCDIFF delta encoding length: 93
-VCDIFF target window length:  2903
-VCDIFF data section length:   72
-VCDIFF inst section length:   8
-VCDIFF addr section length:   3
-  Offset Code Type1 Size1 @Addr1 + Type2 Size2 @Addr2
-  000000 019  CPY_0 1535 @0     
-  001535 001  ADD     72        
-  001607 019  CPY_0 1296 @1517  
-
-
-
-

- - -

xdelta3 -h

- -
-usage: xdelta3 [command/options] [input [output]]
-special command names:
-    config      prints xdelta3 configuration
-    decode      decompress the input
-    encode      compress the input
-    test        run the builtin tests
-special commands for VCDIFF inputs:
-    printdelta  print information about the entire delta
-    printhdr    print information about the first window
-    printhdrs   print information about all windows
-standard options:
-   -0 .. -9     compression level
-   -c           use stdout
-   -d           decompress
-   -e           compress
-   -f           force overwrite
-   -h           show help
-   -q           be quiet
-   -v           be verbose (max 2)
-   -V           show version
-memory options:
-   -B blksize   source file block size
-   -M memsize   memory budget for hash tables
-   -W winsize   input window buffer size
-compression options:
-   -s source    source file to copy from (if any)
-   -S [djw|fgk] enable/disable secondary compression
-   -N           disable small string-matching compression
-   -D           disable external decompression (encode/decode)
-   -R           disable external recompression (decode)
-
-

- -

- - - 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 @@ -body { - margin-top: 15px; - margin-left: 15px; - background-color:#b0b0b0; - color:#204080; - font-family: serif; - word-spacing: 0.5pt; - text-indent: 0pt; -} - -A:visited { - color: #204080; -} -A:link { - color: #102040; -} -h1 { - color: #103060; - font-size: 150%; -} - -h2 { - color: #103060; - font-size: 80%; -} - -code, pre { - font-family: monospace; -} - -pre { - color: #102040; -} - -code { - color:#0060c0; -} - -.example { - margin-right: 20px; - margin-left: 20px; - - padding-left: 20px; - padding-right: 20px; - padding-top: 0px; - padding-bottom: 0px; - - background-color: #808080; - border-style: solid; - border-width: 1px; - border-color: #000000; -} - -.leftbdr { - font-family: sans-serif; - color: #103060; - background-color: #606060; - border-style: solid; - border-width: 1px; - border-color: #000000; -} -.leftbody A:visited { - color: #102040; - text-decoration: none; -} -.leftbody A:link { - color: #102040; - text-decoration: none; -} 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 @@ - - - - Xdelta3 delta compression library (BETA) - - - - - - - - -
- - - -

version three?

- -Xdelta3 is the third and latest release of Xdelta, which is a set of tools and -APIs for reading and writing compressed deltas. Deltas encode the -differences between two versions of a document. This release features a -completely new compression engine, several algorithmic improvements, a fully -programmable interface modelled after zlib, in addition to a command-line -utility, use of the RFC3284 (VCDIFF) encoding, a python extension, and now -64-bit support.

- -Xdelta3 is tiny. A minimal, fully functional VCDIFF decoder library -pipes in at 16KB. The command-line utility complete with encoder/decoder -tools, external compression support, and the djw secondary -compression routines, is just under 60KB, slightly larger than a -gzip executable.

- -Xdelta3 has few dependencies because it's capable of stand-alone file -compression (i.e., what zlib and gzip do). The stand-alone compression of -Xdelta3/VCDIFF is 10-20% worse than gzip, you may view this as -paying for the convenience-cost of having a single encoding, tool, and api -designed to do both data-compression and differencing at -once.

- -The Xdelta3 command-line tool, xdelta3, supports several -convenience routines. Delta compression works when the two inputs are -similar, but often we would like to compute the difference between two -compressed documents. xdelta3 has (optional) support to -recognize externally compressed inputs and process them correctly. This -support is facilitated, in part, using the VCDIFF application header -field to store xdelta3 meta-data, which includes the original -file names (if any) and codes to incidate whether the inputs were externally -compressed. Applications may provide their own application header.

- -

what are version one and version two?

- -Many shortcomings in the Xdelta1.x release are fixed in its replacement, -Xdelta3. Xdelta1 used both a simplistic compression algorithm and a -simplistic encoding. For example, Xdelta1 compresses the entire document at -once and thus uses memory proportional to the input size.

- -The Xdelta1 compression engine made no attempt to find matching strings -smaller than say 16 or 32 bytes, and the encoding does not attempt to -efficiently encode the COPY and ADD instructions -which constitute a delta. For documents with highly similar data, however, -these techniques degrade performance by a relatively insignificant amount. -(Xdelta1.x compresses the delta with Zlib to improve matters, but this -dependency stinks.)

- -Despite leaving much to be desired, Xdelta1 showed that you can do well -without great complexity; as it turns out, the particulars of the compression -aengine are a relatively insignificant compared to the difficulty of -programming an application that uses delta-compression. Better solve that -first.

- -What we want are systems that manage compressed storage and network -communication. The second major release, Xdelta2, addresses these issues. -Xdelta2 features a storage interface -- part database and part file system -- -which allows indexing and labeling compressed documents. The feature set is -similar to RCS. The Xdelta2 interface supports efficient algorithms for -extracting deltas between any pair of versions in storage. The -extraction technique also does not rely on hierarchy or centralizing the -namespace, making the techniques ideal for peer-to-peer communication and -proxy architectures. I am grateful to Mihut Ionescu for implementing the -Xproxy HTTP delta-compressing proxy system based on this interface and -studying the benefits of delta-compression in that context. Xdelta2 stressed -the Xdelta1 compression engine beyond its limits; so Xdelta3 is designed as -the ideal replacement. The Xdelta2 techniques are yet to be ported to the new -implementation.

- -

- - - diff --git a/xdelta3/xdelta3-main.h b/xdelta3/xdelta3-main.h index 887f368..e2fe460 100755 --- a/xdelta3/xdelta3-main.h +++ b/xdelta3/xdelta3-main.h @@ -322,7 +322,7 @@ static int main_version (void) { /* $Format: " P(RINT \"VERSION=3.$Xdelta3Version$\\n\");" $ */ - P(RINT "VERSION=3.0m\n"); + P(RINT "VERSION=3.0n\n"); return EXIT_SUCCESS; } diff --git a/xdelta3/xdelta3-regtest.py b/xdelta3/xdelta3-regtest.py index 03d3a2e..9e90f8b 100755 --- a/xdelta3/xdelta3-regtest.py +++ b/xdelta3/xdelta3-regtest.py @@ -31,8 +31,6 @@ MIN_SIZE = 0 TIME_TOO_SHORT = 0.050 -MIN_REPS = 1 -MAX_REPS = 1 SKIP_TRIALS = 2 MIN_TRIALS = 3 MAX_TRIALS = 15 @@ -208,13 +206,12 @@ class RcsFile: self.Vstr(v), self.Verf(v+1), self.Vstr(v+1))) - print 'testing %s %s: ideal %.3f%%: time %.7f: in %u/%u trials' % \ + print 'testing %s %s: ideal %.3f%%: time %.7f: in %u trials' % \ (os.path.basename(self.fname), self.Vstr(v+1), result.r1.ideal, result.time.mean, - result.trials, - result.reps) + result.trials) ntrials.append(result) os.remove(self.Verf(self.totrev-1)) @@ -316,15 +313,14 @@ class Bucks: # # class TimeRun: - def __init__(self,runnable,set_reps=1,reps=MIN_REPS,max_reps=MAX_REPS,\ - skip_trials=SKIP_TRIALS,min_trials=MIN_TRIALS,max_trials=MAX_TRIALS, \ + def __init__(self,runnable, + skip_trials=SKIP_TRIALS,min_trials=MIN_TRIALS,max_trials=MAX_TRIALS, min_stddev_pct=MIN_STDDEV_PCT): min_trials = min(min_trials,max_trials) self.trials = 0 self.measured = [] self.r1 = None - self.reps = reps while 1: try: os.remove(DFILE) @@ -335,7 +331,7 @@ class TimeRun: start_time = time.time() start_clock = time.clock() - result = runnable.Run(self.trials, self.reps) + result = runnable.Run(self.trials) if self.r1 == None: self.r1 = result @@ -343,15 +339,8 @@ class TimeRun: total_clock = (time.clock() - start_clock) total_time = (time.time() - start_time) - elap_time = max((total_time) / self.reps, 0.000001) - elap_clock = max((total_clock) / self.reps, 0.000001) - - #print 'trial: %d' % self.trials - if set_reps and runnable.canrep and total_time < TIME_TOO_SHORT and self.reps < max_reps: - self.reps = max(self.reps+1,int(self.reps * TIME_TOO_SHORT / total_time)) - self.reps = min(self.reps,max_reps) - #print 'continue: need more reps: %d' % self.reps - continue + elap_time = max((total_time), 0.000001) + elap_clock = max((total_clock), 0.000001) self.trials = self.trials + 1 @@ -478,29 +467,37 @@ class Xdelta3Pair: self.newv = newv return self - def Run(self,trial,reps): - RunXdelta3(['-P', - '%d' % reps] + - self.extra + - [self.encode_args, - self.presrc, - self.old, - self.new, - DFILE]) - if trial > 0: - return None - self.dinfo = Xdelta3Info(self.new,DFILE) - if self.dinfo.extcomp: - raise SkipRcsException('ext comp') - RunXdelta3([self.decode_args, - self.presrc, - self.old, - DFILE, - RFILE]) - RunCommand(('cmp', - self.new, - RFILE)) - return self.dinfo + def Run(self,trial): + + # TODO: move '-S djw' somewhere else + encode_args = self.extra + \ + [ '-S', 'djw' ] + \ + [self.encode_args, + self.presrc, + self.old, + self.new, + DFILE] + + decode_args = [self.decode_args, + self.presrc, + self.old, + DFILE, + RFILE] + try: + RunXdelta3(encode_args) + if trial > 0: + return None + self.dinfo = Xdelta3Info(self.new,DFILE) + if self.dinfo.extcomp: + raise SkipRcsException('ext comp') + RunXdelta3(decode_args) + RunCommand(('cmp', + self.new, + RFILE)) + return self.dinfo + except CommandError: + print 'encode args: %s' % ' '.join(encode_args) + print 'decode args: %s' % ' '.join(decode_args) def Test(): rcsf = RcsFinder() @@ -529,15 +526,10 @@ def Decimals(max): return l class Xdelta3Run1: - def __init__(self,file,reps=0): + def __init__(self,file): self.file = file - self.reps = reps - self.canrep = 1 - def Run(self,trial,reps): - if self.reps: - assert(reps == 1) - reps = self.reps - RunXdelta3(['-P', '%d' % reps, '-efq', self.file, DFILE]) + def Run(self,trial): + RunXdelta3(['-efq', self.file, DFILE]) if trial > 0: return None return Xdelta3Info(self.file,DFILE) @@ -546,8 +538,7 @@ class GzipRun1: def __init__(self,file): self.file = file self.canrep = 0 - def Run(self,trial,reps): - assert(reps == 1) + def Run(self,trial): RunCommandIO(['gzip', '-cf'], self.file, DFILE) if trial > 0: return None @@ -560,8 +551,8 @@ def SetFileSize(F,L): os.close(fd) def ReportSpeed(L,tr,desc): - print '%s 0-run length %u: dsize %u: time %.3f ms: encode %.0f B/sec: in %ux%u trials' % \ - (desc, L, tr.r1.dsize, tr.time.mean * 1000.0, ((L+tr.r1.dsize) / tr.time.mean), tr.trials, tr.reps) + print '%s 0-run length %u: dsize %u: time %.3f ms: encode %.0f B/sec: in %u trials' % \ + (desc, L, tr.r1.dsize, tr.time.mean * 1000.0, ((L+tr.r1.dsize) / tr.time.mean), tr.trials) def MakeBigFiles(rcsf): rand = random.Random() @@ -586,39 +577,6 @@ def MakeBigFiles(rcsf): return (TMPDIR + "/big.1", TMPDIR + "/big.2") -def BigFileRun(f1, f2): - - testcases = [ - # large_look large_step small_look small_chain small_lchain - # ssmatch try_lazy max_lazy long_enough promote -# ['-DC', '10,1,4,36,13,0,1,512,256,0'], -# ['-DC', '10,1,4,36,13,0,1,256,128,0'], -# ['-DC', '10,1,4,36,13,0,1,128,64,0'], -# ['-DC', '10,1,4,36,13,0,1,64,32,0'], - - ['-DC', '11,7,4,2,1,0,0,110,178,1'], - ['-DC', '11,7,4,3,1,0,0,110,178,1'], - ['-DC', '11,7,4,4,1,0,0,110,178,1'], - ['-DC', '11,7,4,5,1,0,0,110,178,1'], - ['-DC', '11,7,4,2,1,0,0,110,100,1'], - ['-DC', '11,7,4,2,1,0,0,110,50,1'], - ['-DC', '11,7,4,2,1,0,0,110,25,1'], - ] - - for test in testcases: - runner = Xdelta3Pair() - runner.extra = test - result = TimeRun(runner.Runner(f1, 1, f2, 2)) - - print 'test %s dsize %d: time %.7f: in %u/%u trials' % \ - (test, - result.r1.dsize, - result.time.mean, - result.trials, - result.reps) - #end - return 1 - class RandomTestResult: def __init__(self, round, config, runtime, compsize): self.round = round @@ -672,15 +630,15 @@ class RandomTester: def RandomConfig(self): input_ranges = [ - (7, 9, 12, 'large_look'), - (1, 9, 17, 'large_step'), + (9, 9, 9, 'large_look'), + (1, 4.5, 8, 'large_step'), (4, 4, 4, 'small_look'), # Note: disabled - (1, 10, 100, 'small_chain'), - (1, 5, 50, 'small_lchain'), + (1, 10, 30, 'small_chain'), + (1, 3.5, 6, 'small_lchain'), (0, 0, 0, 'ssmatch'), # Note: disabled (1, 1, 1, 'trylazy'), # Note: enabled - (1, 128, 1024, 'max_lazy'), - (1, 256, 2048, 'long_enough'), + (1, 128, 256, 'max_lazy'), + (1, 256, 512, 'long_enough'), (0, 0, 0, 'promote'), # Note: disabled ] @@ -697,7 +655,7 @@ class RandomTester: else: val = -1 while val < minv or val > maxv: - val = int(self.random.expovariate(1.0 / mean)) + val = int(self.random.expovariate(1.0 / mean) + 0.5) #end #end @@ -758,10 +716,14 @@ class RandomTester: sized = [] for test in self.results: + + # This scores ellipse has x-major (time) and y-minor (size) ntime = (test.time()) / float(maxt) nsize = (test.size()) / float(maxs) - score = math.sqrt((maxs / mins) * ntime * ntime + - (maxt / mint) * nsize * nsize) + + wntime = ntime * (maxs / mins) + wnsize = nsize * (maxt / mint) + score = math.sqrt(wntime * wntime + wnsize * wnsize) scored.append((score, test)) timed.append((test.time(), test, score)) sized.append((test.size(), test, score)) diff --git a/xdelta3/xdelta3.prj b/xdelta3/xdelta3.prj index 684b109..0740f58 100755 --- a/xdelta3/xdelta3.prj +++ b/xdelta3/xdelta3.prj @@ -1,44 +1,39 @@ ;; -*- Prcs -*- (Created-By-Prcs-Version 1 3 4) (Project-Description "") -(Project-Version xdelta3 0 11) -(Parent-Version xdelta3 0 10) -(Version-Log "compiles on cygwin, copyright years updated, python experiments") +(Project-Version xdelta3 0 12) +(Parent-Version xdelta3 0 11) +(Version-Log "fixes buffer-allocation in xdelta3-decode related to secondary, adds new -6 default compression level") (New-Version-Log "") -(Checkin-Time "Wed, 31 Jan 2007 22:47:01 -0800") +(Checkin-Time "Sun, 04 Feb 2007 01:49:07 -0800") (Checkin-Login jmacd) (Populate-Ignore ()) (Project-Keywords - (Xdelta3Version "0m") - (WWWLeftNavBar "
") + (Xdelta3Version "0n") ) (Files (COPYING (xdelta3/b/29_COPYING 1.1 644)) - (xdelta3-cfgs.h (xdelta3/9_xdelta3-cf 1.3 744)) - (xdelta3-decode.h (xdelta3/b/30_xdelta3-de 1.3 744)) - (xdelta3-djw.h (xdelta3/8_xdelta3-dj 1.4 744)) + (xdelta3-cfgs.h (xdelta3/9_xdelta3-cf 1.4 744)) + (xdelta3-decode.h (xdelta3/b/30_xdelta3-de 1.4 744)) + (xdelta3-djw.h (xdelta3/8_xdelta3-dj 1.5 744)) (xdelta3-fgk.h (xdelta3/7_xdelta3-fg 1.3 744)) - (xdelta3-list.h (xdelta3/6_xdelta3-li 1.3 744)) - (xdelta3-main.h (xdelta3/5_xdelta3-ma 1.7 744)) - (xdelta3-python.h (xdelta3/4_xdelta3-py 1.3 744)) - (xdelta3-regtest.py (xdelta3/10_xdelta3-re 1.6 744)) - (xdelta3-second.h (xdelta3/3_xdelta3-se 1.3 744)) - (xdelta3-test.h (xdelta3/2_xdelta3-te 1.5 744)) - (xdelta3.c (xdelta3/16_xdelta3.c 1.6 744)) - (xdelta3.h (xdelta3/1_xdelta3.h 1.5 744)) + (xdelta3-list.h (xdelta3/6_xdelta3-li 1.3 644)) + (xdelta3-main.h (xdelta3/5_xdelta3-ma 1.8 744)) + (xdelta3-python.h (xdelta3/4_xdelta3-py 1.3 644)) + (xdelta3-regtest.py (xdelta3/10_xdelta3-re 1.7 744)) + (xdelta3-second.h (xdelta3/3_xdelta3-se 1.4 744)) + (xdelta3-test.h (xdelta3/2_xdelta3-te 1.6 744)) + (xdelta3.c (xdelta3/16_xdelta3.c 1.7 744)) + (xdelta3.h (xdelta3/1_xdelta3.h 1.6 744)) - (Makefile (xdelta3/0_Makefile 1.4 744)) - (setup.py (xdelta3/11_setup.py 1.2 744)) + (Makefile (xdelta3/0_Makefile 1.5 744)) + (setup.py (xdelta3/11_setup.py 1.3 744)) (draft-korn-vcdiff.txt (xdelta3/b/22_draft-korn 1.1 644)) - (www/xdelta3-api-guide.html (xdelta3/b/23_Xdelta3-ap 1.5 744)) - (www/xdelta3-cmdline.html (xdelta3/b/25_xdelta3-cm 1.3 744)) - (www/xdelta3.css (xdelta3/b/26_xdelta3.cs 1.3 744)) - (www/xdelta3.html (xdelta3/b/24_Xdelta3.ht 1.5 744)) (badcopy.c (xdelta3/20_badcopy.c 1.2 744)) - (linkxd3lib.c (xdelta3/19_linkxd3lib 1.2 744)) + (linkxd3lib.c (xdelta3/19_linkxd3lib 1.3 744)) (rcs_junk.cc (xdelta3/15_rcs_junk.c 1.1 644)) (README (xdelta3/b/31_README 1.1 744)) -- cgit v1.2.3