feed gzipping: add header and reorder code