zgrep works for both plain text and gzipped streams so you can do something like this (assuming you have both deflated and non-deflated files that matches the glob pattern):
zgrep somepattern /var/log/messages*