Are revlog diff calculated as "text" ALWAYS?

Matt Mackall mpm at selenic.com
Tue May 13 19:21:52 UTC 2014


On Tue, 2014-05-13 at 00:19 +0200, Jesus Cea wrote:
> 2. Create a 200Kb random file, with no "LINEFEED"s on it:
> 
>     cat /dev/urandom | tr -d '\n' | dd of=z bs=1024 count=200

That's a rather unusual binary file, no? Indeed, it will completely
defeat our delta algorithm.

But a binary that contains any of the following will have plenty of
linefeed bytes (0x0a):

- compressed data of any sort
- raw binary data with non-contrived distributions
- machine code
- embedded text

..so if you can find a real-world 200k file that doesn't have enough
0x0a bytes in it to be digestible, I'll be amazed.

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list