I recently came upon an excellent and detailed account of how to recover a damaged sparse disk image.
I use encrypted sparse images all the time to securely store files. Sparse images have the advantage of automatically resizing as you add more files, so that you don’t have to devote a huge amount of disk space for the image until it’s really needed.
Unfortunately, it’s not uncommon for these images to become corrupt if the resizing process is cancelled before it’s completed (for example if if the Finder crashes while the image is resizing). As sparse images are also used for Filevault-protected Macs, this could potentially lead to a catastrophic loss of data.
So this technique, while somewhat involved, is a welcome addition to my disk repair arsenal.