aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO.md24
-rw-r--r--main.go16
2 files changed, 28 insertions, 12 deletions
diff --git a/TODO.md b/TODO.md
index 12c4686..bd95c74 100644
--- a/TODO.md
+++ b/TODO.md
@@ -9,14 +9,26 @@ priority 1
- [x] better tests for `(*Repo).Commit`
- [x] remove errored files from `fileList`
- [ ] export in `dir` format
- - [ ] add superblock.
- - [ ] add version blocks.
+ - [ ] add superblock (this is related to the `init` cmd).
+ - [x] add version blocks (these are filled with the recipe and files if
+ there is space left)
- [x] command line with subcommands (like, hmm... git ? for instance).
-- experiences:
- - [ ] compare against UDF (this will not be possible, unless we use a real
- CR-ROM)
- - [ ] make multiple repo versions with multiple parameters
+- [ ] experiences:
+ - [x] compare against UDF (this will not be possible, unless we use a real
+ CR-ROM) (we used git storage for an approximation)
+ - [x] make multiple repo versions with multiple parameters
- smaller block size
+ - [ ] use export in bench to compare the performance when all chunks are
+ compressed at once.
+- [ ] `init` command to initialize repo
+ - [ ] remove `chunkSize` parameter from all commands, keep it only on `init`
+ - [ ] `init` would save the important parameters of the repo, such as:
+ - the bloc size
+ - the delta algorithm
+ - the compression algorithm
+ - the sketch parameters
+ - ...and almost every value of the `NewRepo` constructor
+ - [ ] these parameters would be loaded in the `*Repo.Init()` function
priority 2
----------
diff --git a/main.go b/main.go
index fb0478e..250af73 100644
--- a/main.go
+++ b/main.go
@@ -40,10 +40,12 @@ const (
)
var (
- logLevel int
- chunkSize int
- format string
- trackSize int
+ logLevel int
+ chunkSize int
+ format string
+ poolCount int
+ trackSize int
+ tracksPerPool int
)
var Commit = command{flag.NewFlagSet("commit", flag.ExitOnError), commitMain,
@@ -79,7 +81,9 @@ func init() {
s.Flag.IntVar(&chunkSize, "c", 8<<10, "chunk size")
}
Export.Flag.StringVar(&format, "format", "dir", "format of the export (dir, csv)")
+ Export.Flag.IntVar(&poolCount, "pools", 96, "number of pools")
Export.Flag.IntVar(&trackSize, "track", 1020, "size of a DNA track")
+ Export.Flag.IntVar(&tracksPerPool, "tracks-per-pool", 10000, "number of tracks per pool")
}
func main() {
@@ -138,10 +142,10 @@ func exportMain(args []string) error {
r := repo.NewRepo(source, chunkSize)
switch format {
case "dir":
- exporter := dna.New(dest, 96, trackSize, 10000)
+ exporter := dna.New(dest, poolCount, trackSize, tracksPerPool)
r.Export(exporter)
case "csv":
- fmt.Println("csv")
+ fmt.Println("not yet implemented")
default:
logger.Errorf("unknown format %s", format)
}