Use generators and add a gzip support. Signed-off-by: Timothée Peignier <timothee.peignier@tryphon.org>