open-hook regexp "command"
The command is the command that can be used for opening the folders whose names match regexp.
The command string is the printf-like format string, and it should accept two parameters: %f, which is replaced with the (compressed) folder name, and %t which is replaced with the name of the temporary folder to which to write.
%f and %t can be repeated any number of times in the command string, and all of the entries are replaced with the appropriate folder name. In addition, %% is replaced by %, as in printf, and any other %anything is left as is.
The command should not remove the original compressed file. The command should return non-zero exit status if it fails, so mutt knows something's wrong.
open-hook \\.gz$ "gzip -cd %f > %t"
If the command is empty, this operation is disabled for this file type.