From: Brian I. <in...@tt...> - 2002-01-29 05:47:31
|
I've been thinking about a good format for 'yar', the YAML ARchive format that will be a readable and editable substitute for tar or zip. My basic format idea is to have the first document in the yar stream be a directory containing all the necessary file system info. The directory entries will be an index pointing to other documents in the stream. Each following document will be the contents of a file. Plain text files can be stored as is. Binary docs can be encoded in base64 or something else. --- !yar/directory home/ingy/YAML: - !yar/file name: YAML.pm perm: rw-r--r-- index: 1 - !yar/file name: YAML.pod perm: rw-r--r-- --- |2 contents of YAML.pm --- |1 contents of YAML.pm ... File documents would normally not be indented to save space. YAML.pm is indented because it happens to contain lines starting with ---. This will be a common occurance since files may often be YAML streams themselves (as YAML begins to take over the universe :) This is a powerful notion. If a document conatins '^---', we no longer need to switch to a new separator. We can simply indent the top level scalar! This is good because the stream might already be started by the time we realize that there is a conflict. yar (the format) will not address compression. This can accomplished with any number of compression libraries which will compress the entire YAML stream. yar (the program) may end up linking in a compression library much the way that modern tars do. I'll write the initial yar program in Perl and distribute it with YAML.pm. Later we can redo it in C. I'd like to know if anyone has ideas on yar in general. Perhaps this discussion should be taken to yaml-dev or yaml-projects. Have these (any) new mailing lists been started yet? Cheers, Brian |