服务器使用Gzip压缩数据,加快网络传输(Java 例子)
来源:互联网 发布:多媒体播放器软件 编辑:程序博客网 时间:2024/05/01 19:25
The next version of the Project will provide support for gzip in order to faster speed of data transmission on the network。在我们的项目中,添加对gzip的支持,是为了加快数据在网络中的传输速度。
If you need to transfer data using gzip, you must be setting request header "Accept-Encoding"="gzip". Thus, you will get a response, which include the response header name "Content-Encoding" and value "gzip", and need to ungzip the response data. Besides, the response header name "Content-Length" also will be returned.使用gzip,首先要设置请求消息头Accept-Encoding为gzip。这样,你将会得到一个响应,根据消息头Content-Encoding为gzip你可以知道,传输过来的数据是经过gzip压缩的。另外,消息头Content-Length会告诉你压缩后的数据长度。
A example using gzip implemented by Java。用Java实现的gzip
If you need to transfer data using gzip, you must be setting request header "Accept-Encoding"="gzip". Thus, you will get a response, which include the response header name "Content-Encoding" and value "gzip", and need to ungzip the response data. Besides, the response header name "Content-Length" also will be returned.使用gzip,首先要设置请求消息头Accept-Encoding为gzip。这样,你将会得到一个响应,根据消息头Content-Encoding为gzip你可以知道,传输过来的数据是经过gzip压缩的。另外,消息头Content-Length会告诉你压缩后的数据长度。
A example using gzip implemented by Java。用Java实现的gzip
In addtional, give a example about Server compress the data using gzip。使用gzip在服务器端压缩数据的例子。
阅读全文
0 0
- 服务器使用Gzip压缩数据,加快网络传输(Java 例子)
- 服务器使用Gzip压缩数据,加快网络传输(Java 例子)
- 服务器使用Gzip压缩数据,加快网络传输(Java 例子)
- 服务器使用Gzip压缩数据,加快网络传输(Java 例子)
- 在Unity3d中使用GZip来压缩网络传输数据
- 减小网络传输图片大小,使用gzip进行压缩
- ext_js使用GZIP压缩传输
- 使用GZIP压缩的方式向客户端传输响应数据
- 在Unity3d中使用GZip来压缩传输数据
- 在Unity3d中使用GZip来压缩传输数据
- 使用Java实现网络传输数据的压缩.
- 使用Java实现网络传输数据的压缩
- java GZIP 压缩数据
- java服务器对json数据进行gzip压缩
- android开发中使用GZIP压缩传输
- android开发中使用GZIP压缩传输
- java web实现Gzip压缩传输
- java web实现Gzip压缩传输
- java入门(二)
- 不用获取权限的悬浮球
- 柔性数组
- 医学图像处理涉及到的窗宽窗位 1
- 行为型模式之模板模式实现
- 服务器使用Gzip压缩数据,加快网络传输(Java 例子)
- Android USB默认连接模式为MTP
- validate插件
- EL和JSTL
- An impassioned circulation of affection(codefoces 814c)
- liunx 阿里云 统一服务器下 部署多个tomcat(亲试)
- Mac 安装Scrapy爬虫库失败
- 闲话虚拟化和云计算的异同点
- 可扩展标记语言