-*- Org -*-

Copyright 2010  Ludovic Courtès <ludo@gnu.org>

  Copying and distribution of this file, with or without modification,
  are permitted in any medium without royalty provided the copyright
  notice and this notice are preserved.

* Packaging
** Officially use C99

  - the `inline' keyword
  - varargs macros
  - int array[x]; instead of alloca()
  - statement as expression?

** Write more documentation.

** Publish `archival-server' perhaps under the name "Anemoi"
* Storage
** Use Gnulib's `full_read' in stream-file.c
** Add recursive directory archival to `chop-archiver' [0/2]

  - [ ] Add support in `chop-archiver', a `--recursive' option.
  - [ ] implement a "directory_stream" which would produce a stream like
    this:

	relative/path/foo/bar|TYPE|HANDLE
	...

    where `|' may actually be a null byte (problem: using it with
    Coreutils `cut' is not convenient) or a TAB (easier to use with
    `cut', etc.), and where TYPE would tell whether it's a symlink,
    fifo, etc.

#+BEGIN_SRC c
/* Pass INDEX_FILE an fd to the file to index.  INDEX_FILE should return a
   serialized index.

   Rationale:

   - passing all the indexer, block indexer, chopper, etc. as arguments is
     inconvenient and prevents some uses (e.g., taking the handle from a
     cache somewhere);

   - returning a `chop_index_handle_t' is not enough if we eventually want
     to serialize the whole tuple with `chop_ascii_serialize_index_tuple ()'.  */

errcode_t
chop_directory_stream_open (int dirfd,
			    char * (*index_file) (int file_fd, void *),
			    void *closure);
#+END_SRC

    See ideas from [[http://repo.or.cz/w/git.git/blob/HEAD:/Documentation/technical/api-tree-walking.txt][Git]].

** Implement a file system based block store (à la Git).

Possibly have it work over FTP, SFTP, etc., though we don't want to
implement yet another VFS.

** Provide a store using the Panada DHT?

See http://savannah.nongnu.org/p/panada .

** Implement a DBus-based block store?

Though it may not be that useful...

** Experiment with simple erasure codes, like B-Codes.  Not sure this belong
   to libchop though.

Could try with [[http://www.ka9q.net/code/fec/][FEC]] (LGPL).

See also [[http://itpp.sourceforge.net/current/reedsolomon.html][IT++]].

** Add support for Camellia, Serpent, etc.
** Add a GPGME encryption/decryption filter
** Borrow ideas from Git's packs?

http://repo.or.cz/w/git.git?a=blob;f=Documentation/technical/pack-format.txt

* User interface
** Have `chop-archiver' take fd numbers instead of paths, to honor POLA

Example: chop-archiver --archive-fd 5 5< /foo/bar

** Allow `chop-archiver' to read from stdin

Example: echo foo | chop-archive --archive
** Add an option to specify the format of OpenPGP keys (archiver/block-server)
** chop-block-server: Add an option like `--restrict' but with OpenPGP fingerprints
** Return a meaningful error code in DB_WRITE_BLOCK_METHOD et al.

* Guile bindings
** Rewrite using `(system foreign)'
