add gzip compressing & improve buffer #7