Android 中的 GZip
如何使用 GZip 在 Android 中压缩和解压缩文件。请提供一些参考,这样对我有很大帮助。
提前致谢
How to compress and decompress a file in android using GZip. please provide with some reference , so that it would a great help for me.
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
请使用以下方法使用 gzip 压缩字符串。
Please use the following methods to compress the string using gzip.
查看
GZIPInputStream
和GZIPOutputStream
。Check out
GZIPInputStream
andGZIPOutputStream
.我前段时间遇到了同样的问题。以下是我使用的函数
压缩函数
if (responseCode == HttpConnection.HTTP_OK){
解压缩函数:-
}
I ran into same problem some time ago. Here are the functions i used
Compress Function
if (responseCode == HttpConnection.HTTP_OK){
Decompress function:-
}