i've been using apple's filevault on mac os x 10.4 for a while now, but i've noticed in the last several months that space is not actually reclaimed after i delete files, even when i tell filevault to reclaim it (it asks on logout). so i found the command-line equivalents and got back 40% of my hard disk this morning.
to do this you must have access to an admin account and either it must be a different account from the one with the filevault in question, or you must enable the text-input feature on the login screen. to get started, log out of your session and type the special >console username to get a text-based login. log into your admin account on the text console and run the following commands. i'll assume the account with the filevault is called user. the usual disclaimers apply — it worked for me, but always back up everything before touching a filesystem repair tool!
first, repair any damage to the image. enter passwords as prompted and note where the Apple_HFS device is; i assume /dev/disk1s2.
$ sudo hdiutil attach -nomount -stdinpass ~user/user.sparseimage
$ sudo fsck_hfs -yf /dev/disk1s2
$ sudo hdiutil detach /dev/disk1s2
second, compact the image to reclaim unused space.
$ sudo hdiutil compact -stdinpass ~user/user.sparseimage
log out, cross fingers, and log in normally as user.