2014年1月27日

android与服务端通讯时使用到的GZIP压缩及解压

摘要: 为了减小android项目与服务端进行通讯时的数据流量,我们可以使用GZIP对服务端传输的数据进行压缩,在android客户端解压。或在客户端压缩,在服务端解压。代码如下:android客户端的GZIP操作类:import java.io.ByteArrayInputStream;import java.io.ByteArrayOutputStream;import java.io.IOException;import java.nio.ByteBuffer;import java.util.zip.GZIPInputStream;import java.util.zip.GZIPOutput 阅读全文

posted @ 2014-01-27 10:28 刑天 阅读(1902) 评论(2) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示