gzip 压缩对移动设备有用吗?
我想知道是否有人知道 gzip 压缩在移动设备上是否与在台式计算机上一样有用。
手机会消耗更多电量吗? 还是会因为节省带宽而节省一些? 在这些有限的设备上,页面加载速度会更快还是解压缩过程会很慢?
压缩数据是否真正到达最终用户,还是由 3G 提供商在某处解压缩? (这可能是一个愚蠢的问题,抱歉)。
谢谢。
I'm wondering if anyone has a clue on whether the gzip compression is as much useful on mobile devices than it is on a desktop computer.
Will the phone use more battery?
Or will it save some because of the bandwidth saving?
Will the page page load faster or is the uncompress process slow on those limited devices?
Does the compressed data actually reach the end-user or is it uncompressed somewhere by the 3G provider? (this may be a stupid question, sorry).
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
根本不是一个愚蠢的问题。
正确的权衡是有利于 GZip。
事实证明,Lempel-Ziv 解压缩相当便宜(与压缩非常不同),而带宽通常相当昂贵,特别是对于漫游消费者而言,并且还需要大量电池电量和传输时间。
Not a stupid question at all.
The correct trade-of is in favor of GZip.
It turns out that the Lempel-Ziv decompression is fairly cheap (much unlike the compression), while bandwidth is usually quite expensive, esspecially for roaming consumers, and also takes much battery power and transfer time.
这始终取决于您的瓶颈在哪里。
给它带来更大负担的是
坏的。
压缩数据传输量巨大
性能提升。
对于当今的移动设备,CPU 功率肯定比台式电脑弱,但通常足以进行 gzip 压缩和解压缩。在大多数情况下,瓶颈将是网络连接,因此 gzip 压缩当然有用。不过,在极少数情况下,情况恰恰相反。
您只需要使用一点常识来看看我的答案是否适用于您的特殊情况;-)
It always depends on where your bottleneck is.
that puts a bigger burden on it is
bad.
compressed data transfer is a huge
performance boost.
With today's mobile devices, cpu power is certainly weaker that that of a desktop pc, but usually strong enough for gzip compression and decompression. In most cases, the bottleneck will be the network connection, so gzip compression is certainly useful. There will be rare cases though, where the opposite is true.
You just need to use a little common sense to see if my answer applies to your special case ;-)
您可能还想研究的一个问题是您正在考虑的移动浏览器是否支持压缩。例如,我刚刚检查了我的 BlackBerry Storm 发送的请求标头,它没有发送任何“Accept-Encoding”标头 - 这意味着服务器不应发回压缩响应。
One question you may also want to investigate is whether or not the mobile browsers you are considering even support compression. For example, I just checked the request headers sent by my BlackBerry Storm and it does not send any "Accept-Encoding" headers -- which means the server should not send back a compressed response.