[RFC] bzr.jrydberg.versionedfile

John Arbash Meinel john at arbash-meinel.com
Wed Dec 21 14:32:42 GMT 2005


Johan Rydberg wrote:
> John Arbash Meinel <john at arbash-meinel.com> writes:
> 
> 
>>>During the last week I've done some more work on my versionedfile
>>>branch, and have implemented the knit history format.  There is still
>>>a lot of things to do, but I think it is in the state where you as a
>>>public user can give it a try.
>>
>>Thanks for doing all this work. It is really nice to see knits start to
>>shape up.
> 
> 
> Thanks.
> 
> 
>>One of the nice things about all formats so far is that I could open
>>them up in vim and see what was going on.
>>With a gzipped file, I can run zcat foo | vim -, and still see the
>>internals.
>>With zlib, there is no way to do that. You *have* to use our routines to
>>understand the underlying bytes. Considering that the true underlying
>>structure is just a bunch of text chunks that seems unnecessarily brittle.
> 
> 
> Each data entry in the data file is compressed individually. Can zcat
> handle several "small files" in one file?
> 

I know you can do:
gzip a
gzip b

cat a.gz b.gz | zcat | vim -

So I'm assuming that it can.
You pay for it by having about 20 bytes of checksum and header
information per gzip blob.

For example:
$ cat /dev/null | gzip > a.gz
$ ll a.gz
-rw-rw-r--  1 jameinel jameinel 20 Dec 21 08:29 a.gz

$ echo foo > b
$ echo baz > c
$ gzip b c
$ ll b.gz c.gz
-rw-rw-r--  1 jameinel jameinel 26 Dec 21 08:30 b.gz
-rw-rw-r--  1 jameinel jameinel 26 Dec 21 08:30 c.gz

$ cat b.gz c.gz > d.gz
$ ll d.gz
-rw-rw-r--   1 jameinel jameinel      52 Dec 21 08:30 d.gz

$ zcat d.gz
foo
baz

So the question is, how big is the expected blobs? How much compression
do you get with zlib? gzip compression is just zlib + header, so they
are certainly comparable :)

John
=:->

> 
>>We may stick with what we've got, I just wanted to bring up the discussion.
> 
> 
> ~j
> 
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051221/bd732dd7/attachment.pgp 


More information about the bazaar mailing list