This might do it:
import glob
import zlib
import sys
for filename in sys.argv:
with open(filename, 'r''rb') as compressed:
with open(filename + '-decompressed', 'w''wb') as expanded:
data = zlib.decompress(compressed.read())
expanded.write(data)
Then run it like this:
$ python expander.py data/*