Binary file handling discussion

John Yates jyates at netezza.com
Fri Nov 3 16:50:02 GMT 2006


On Friday 2006-11-03 Nicholas Allen wrote:

> I think, for text files, it would make sense to store them in the 
> repository using one line ending style. This will prevent massive diffs 
> happenning in the repo when the same file is edited on different OSs and 
> the line endings are converted back and forth. I think it would make 
> sense to store the text files with the \n character rather than windows 
> \r\n as it is shorter and makes more sense anyway.

Using a length-prefixed representation in which no end-of-line character
is stored might make more sense.  Using a variable-length integer encoding
(a la sfio) would mean minimal size penalty without imposing an arbitrary
line length.  Size-prefixed might also aid many algorithms that examine
the contents of a knit.

/john




More information about the bazaar mailing list