https://en.wikipedia.org/wiki/JPEG#/media/File:JPEG_ZigZag.s...
It's a shame the author didn't do the same transformation, because it would de-correlate a lot of the error noise. You can see in the highest compression settings that the "MP3" image compression is smearing everything horizontally. If it used a zigzag transformation, it would be a more smeared both horizontally and vertically, but probably less visually bad.
If you're asking why they use the zigzag (within a block) instead of a Hilbert curve, IIRC (quite fuzzy on this, so take it w/ a gran of salt and verify) the reason is that it allows for better spatial encoding (imagine having a ripple in one corner and going out - that's essentially what you want to encode w/ your DCT). Using a Hilbert curve would preserve locality, but I don't think it would line up with the spatial distribution of frequencies in an image.
No. The zigzag ordering is applied to the frequency components, not to the image pixels.
1. Divide image into blocks (as in JPEG),
2. Perform two-dimensional FFTs (as in JPEG),
3. Scan frequency components in zig-zag order (as in JPEG),
4. Run all of the steps of MP3 compression aside from the initial "split audio into blocks" and "perform FFTs" stages.
That would pretty much just give you a less efficient version of JPEG; both JPEG and MP3 take advantage of knowing how much each frequency component "matters" (i.e., how precisely it's necessary to encode the value to avoid artifacts noticed by humans), so using the MP3 quantization logic on frequency amplitudes from images would result in wasting bits by encoding certain amplitudes more precisely than is useful.
I think this alone would be an improvement for the mp3 encoder.
Also, today I stopped halfway through importing a FLAC of repetitive electronic music into Audacity, and I was surprised to discover that there was almost no repetition (it would play one bar then skip ahead over the identical parts)
Edit: Whoops, totally wrong!
Turns out I was loading a half-torrented file and forgot that torrents don't download in order!