improve end chunked for gzip.

Signed-off-by: Jack <jack.wgm@gmail.com>