Is the sparse file a documented format? I see mention in your path of "zimbra". Does the documentation for that OS project discuss how the sparse file is built, and how it's indexed? The operating system indeed only knows about the file's total size.
It doesn't care or know about how the file is structured internally. There's also reference in your post to an ".mdb" file, which is probably a fairly well-known database. The database may even have housekeeping tools available to you once you know for sure which one it is. If those tools have a command line interface, Perl can drive it.
Update: I stand corrected. Live! Learn! ;)