摘要:
一些网站的页面是通过GZIP技术进行压缩传输的,这样会加快加载速度。但是通过WebClient获取到的html代码则是乱码,所以需要通过GZIP解压来正常显示html代码。byte[] btArrWebHtmlCode = this.GetWebHtmlBytes(url); if (btArrWebHtmlCode.Length == 0) { return string.Empty; } Encoding webEncoding = Encoding.UTF8; ... 阅读全文