Add gzip support to read_ids