Escape null bytes and such to not break sending data when compressing. Also fixed some typos.