I tried to add some documentation and document prepare_download as well.
I found myself in the need to understand which format were available so that the user could choose, and I saw that prepare_download did more or less all that was needed. Hence, I added a menu.pl example.
Hope this helps, Flavio.
added some documentation and documented prepare_download
added note about default filename
added example to show use for prepare_download
Wow! It's great works! :)