On Dec 20, 2016, at 3:57 PM, Warren Young <war...@etr-usa.com> wrote: > >> What if I design some text file format (containing only ascii characters) and >> it can't be properly processed by fossil? > > Then you should post it as a replicable test case for our study.
I decided to take up my own challenge. Consider: ## Create new repo; note initial size $ f init ../x.fossil $ ls -lh ../x.fossil -rw-r--r-- 1 me group 212K Dec 20 16:13 ../x.fossil ## Go grab a free PNG file, and re-save it with Photoshop’s ## Save for Web function to reduce unnecessary differences $ wget https://upload.wikimedia.org/wikipedia/commons/thumb/3/31/Topographic_Map_of_Bulgaria_Bulgarian.png/120px-Topographic_Map_of_Bulgaria_Bulgarian.png $ open -a 'Adobe Photoshop CC 2017' 120px-Topographic_Map_of_Bulgaria_Bulgarian.png $ ls -lh 120px-Topographic_Map_of_Bulgaria_Bulgarian.png -rw-r--r-- 1 me group 23K Dec 20 16:12 120px-Topographic_Map_of_Bulgaria_Bulgarian.png ## Add it to repo; notice that repo size goes up by 20 kB, ## showing that Fossil’s internal compression managed to ## squeeze an additional 3 kB over what Photoshop gives, ## probably due to metadata compression $ f add 120px-Topographic_Map_of_Bulgaria_Bulgarian.png $ f ci -m initial $ f rebuild --compress --vacuum $ ls -lh ../x.fossil -rw-r--r-- 1 me group 232K Dec 20 16:13 ../x.fossil ## Change upper left corner pixel, amounting to only several ## bits of difference in the raw data $ open -a 'Adobe Photoshop CC 2017' 120px-Topographic_Map_of_Bulgaria_Bulgarian.png $ ls -lh 120px-Topographic_Map_of_Bulgaria_Bulgarian.png -rw-r--r-- 1 me group 23K Dec 20 16:14 120px-Topographic_Map_of_Bulgaria_Bulgarian.png ## Check change in; notice that roughly a dozen bits of change in ## the raw data became 28 kB of difference in the repo size! $ f ci -m '1 px change’ $ f rebuild --compress --vacuum $ ls -lh ../x.fossil -rw-r--r-- 1 me group 260K Dec 20 16:14 ../x.fossil Repeating that test with TIFF and PSD files didn’t give as small a difference in the resulting Fossil repos size between checkins as I’d expected, but on investigating I found that Photoshop writes a bunch of stuff into the metadata that change on every save (e.g. timestamps, UUIDs…) which balloons the diffs. Switching to Windows BMP fixes this: a 1px change results in a negligible change in the repo size, because only about a dozen bits change in the raw data. (Windows BMP has very little metadata.) _______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users