Oh, try refreshing the code, the version you have is probably not doing the interleaving but just scanlines. I'll have to make it into an option to let you pick a method, and interleaving should probably be the default.great! that would be an excellent addition to your readme
so i have a jpg file about 6.3M, which converts into a png at 14M or ppm at 35M. the resulting flif is 8.6M. (PLT fails, ACB fails, if that means anything, and interestingly the output flifs from either ppm or png are identical. though if i convert the flif back to a png "the binary files [.png's] differ", though i can't see the difference.)
if i chop up the file as you mention using dd, i start seeing the upper part of the picture at about 2M (the lower half is an impressionistic painting of TV static), at about 4M i get the full picture but with weird colors. colors are a bit messy even up to 7.9M, though only in the lower half where it looks a bit glitchy.
let me know if the above results are strange (the flif is larger than the original jpg), as i could e-mail you the pic.
Compressing a lossy jpeg file losslessly is not a very good idea, because much of the filesize will be spent on encoding the JPEG artifacts. It will almost always be larger than the lossy jpeg, because obviously the jpeg file is not spending any space on those artifacts. It's a better idea to start from something that is not lossy.
PLT and ACB are two transforms the encoder tries: PLT is palette (if there are less than 512 distinct colors, it generates a palette), and ACB is something palette-like for images with sparse colors (more than 512 but significantly less than 2^24).
PNG files can be different (and have different file sizes) while still encoding the exact same image. If you want to compare two images, you shouldn't use diff, but "compare -metric mepp". If the result is "0 (0, 0)", the images are the same. Output to PPM will be faster, if you don't need alpha.