I see this mostly as an academic exercise, still now convinced it has any real-world application. However, as a test of concept it works ok.
The delta-left "compression" is purely arbitrary. Just for fun, I tried making it delta-down (leftmost 2 pixels) and delta-left for the rest. Surprisingly, that gave a nice size reduction.
* Downwards delta-encoding used on border pixels.
* Added Panasonic support.
* Don't apply linearisation tables on Nikon and DNG's. The linearisation should be re-producible from the "shell"-data.
* DNG's no longer cropped, so now retains all data.
That gives the following sizes (fuji+sigma are simply zpaq encoded):
Code:
24 387 048 canon_eos_5d_mark_iii_05.zpaq
25 217 125 canon_eos_6d_14.zpaq
23 705 446 canon_eos_m_04.zpaq
12 434 658 fujifilm_finepix_x100_11.zpaq
14 425 321 fujifilm_xf1_08.zpaq
12 792 840 fujifilm_x_e1_20.zpaq
5 920 202 leica_m82_05.zpaq
10 453 231 leica_x1_10.zpaq
10 698 628 nikon_1_v2_17.zpaq
18 566 863 nikon_d4_10.zpaq
26 185 740 nikon_d5200_14.zpaq
16 197 954 olympus_epm2_16.zpaq
15 924 670 olympus_om_d_e_m5_24.zpaq
12 102 619 olympus_xz2_10.zpaq
14 026 175 panasonic_lumix_dmc_gh3_10.zpaq
15 236 955 panasonic_lumix_g5_15.zpaq
20 012 584 pentax_k5_ii_12.zpaq
14 595 154 pentax_q10_19.zpaq
22 691 159 samsung_nx1000_19.zpaq
25 582 527 samsung_nx20_01.zpaq
14 383 003 sigma_dp2.zpaq
45 871 260 sigma_sd1_merrill_13.zpaq
14 244 370 sony_a55.zpaq
19 892 176 sony_a77_08.zpaq
19 796 622 sony_a99_04.zpaq
455 344 330 bytes
Also tried adding precomp. Sizes with "precomp -c- -t+j -d0" on shell file:
Code:
23 907 098 canon_eos_5d_mark_iii_05.zpaq
24 423 897 canon_eos_6d_14.zpaq
23 002 821 canon_eos_m_04.zpaq
12 256 927 fujifilm_finepix_x100_11.zpaq
14 251 039 fujifilm_xf1_08.zpaq
12 667 259 fujifilm_x_e1_20.zpaq
5 920 237 leica_m82_05.zpaq
10 451 933 leica_x1_10.zpaq
10 224 204 nikon_1_v2_17.zpaq
18 029 156 nikon_d4_10.zpaq
25 288 018 nikon_d5200_14.zpaq
15 950 513 olympus_epm2_16.zpaq
15 709 729 olympus_om_d_e_m5_24.zpaq
11 839 243 olympus_xz2_10.zpaq
13 886 785 panasonic_lumix_dmc_gh3_10.zpaq
15 121 423 panasonic_lumix_g5_15.zpaq
19 620 423 pentax_k5_ii_12.zpaq
13 860 319 pentax_q10_19.zpaq
21 441 988 samsung_nx1000_19.zpaq
24 084 539 samsung_nx20_01.zpaq
14 050 816 sigma_dp2.zpaq
44 202 248 sigma_sd1_merrill_13.zpaq
14 100 595 sony_a55.zpaq
19 722 748 sony_a77_08.zpaq
19 671 905 sony_a99_04.zpaq
443 685 863 bytes
I updated the executable and the source at http://download.klauspost.com/rawcompress/
I don't expect to be able to throw much more time at this, but if you find someone who is interested in picking it up, I'd be happy to assist.