changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > ventivac / changeset: move default rabin parameters to vac.m

changeset 121: 7fd24f62e50a
parent 120: 59e56fcc03ae
child 122: 84abb5444a76
author: Mechiel Lukkien <mechiel@ueber.net>
date: Fri, 17 Aug 2007 22:25:28 +0200
files: appl/cmd/vacput.b appl/cmd/venti/put.b module/vac.m
description: move default rabin parameters to vac.m
     1.1--- a/appl/cmd/vacput.b	Fri Aug 17 22:25:12 2007 +0200
     1.2+++ b/appl/cmd/vacput.b	Fri Aug 17 22:25:28 2007 +0200
     1.3@@ -53,11 +53,11 @@
     1.4 	vac->init();
     1.5 	rabin->init(bufio);
     1.6 
     1.7-	prime := 269;
     1.8-	mod := 8*1024;
     1.9-	width := 31;
    1.10-	blockmin = 1024;
    1.11-	blockmax = 32*1024;
    1.12+	prime := Vac->Rabinprime;
    1.13+	mod := Vac->Rabinmod;
    1.14+	width := Vac->Rabinwidth;
    1.15+	blockmin = Vac->Rabinblockmin;
    1.16+	blockmax = Vac->Rabinblockmax;
    1.17 
    1.18 	arg->init(args);
    1.19 	arg->setusage(sprint("%s [-Dqrv] [-d vacfile] [-a addr] [-b blocksize] [-n name] path ...", arg->progname()));
     2.1--- a/appl/cmd/venti/put.b	Fri Aug 17 22:25:12 2007 +0200
     2.2+++ b/appl/cmd/venti/put.b	Fri Aug 17 22:25:28 2007 +0200
     2.3@@ -44,11 +44,11 @@
     2.4 	vac->init();
     2.5 	rabin->init(bufio);
     2.6 
     2.7-	prime := 269;
     2.8-	mod := 8*1024;
     2.9-	width := 31;
    2.10-	blockmin := 1024;
    2.11-	blockmax := 32*1024;
    2.12+	prime := Vac->Rabinprime;
    2.13+	mod := Vac->Rabinmod;
    2.14+	width := Vac->Rabinwidth;
    2.15+	blockmin := Vac->Rabinblockmin;
    2.16+	blockmax := Vac->Rabinblockmax;
    2.17 
    2.18 	arg->init(args);
    2.19 	arg->setusage(sprint("%s [-dr] [-a addr] [-b blocksize]", arg->progname()));
     3.1--- a/module/vac.m	Fri Aug 17 22:25:12 2007 +0200
     3.2+++ b/module/vac.m	Fri Aug 17 22:25:28 2007 +0200
     3.3@@ -45,6 +45,13 @@
     3.4 	Direntrymagic:	con 16r1c4d9072;
     3.5 	Metablockmagic:	con 16r5656fc79;
     3.6 
     3.7+	# parameters for writing rabin fingerprinted archives
     3.8+	Rabinprime:	con 269;
     3.9+	Rabinmod:	con 8*1024;
    3.10+	Rabinwidth:	con 31;
    3.11+	Rabinblockmin:	con 1024;
    3.12+	Rabinblockmax:	con 32*1024;
    3.13+
    3.14 	Root: adt {
    3.15 		version:	int;
    3.16 		name:	string;