the extract_archive() in http://github.com/Rydgel/archlinux/blob/master/.zshrc
but yours looks like it takes care of other things like archives within archives.