gzip 压缩对移动设备有用吗?

发布于 2024-09-05 18:42:49 字数 184 浏览 5 评论 0原文

我想知道是否有人知道 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

葵雨 2024-09-12 18:42:50

根本不是一个愚蠢的问题。

正确的权衡是有利于 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.

站稳脚跟 2024-09-12 18:42:50

这始终取决于您的瓶颈在哪里。

  • 如果是一个非常弱的CPU,什么都可以
    给它带来更大负担的是
    坏的。
  • 如果是你的网络连接,
    压缩数据传输量巨大
    性能提升。
  • 无论如何,电池的压力应该可以忽略不计。

对于当今的移动设备,CPU 功率肯定比台式电脑弱,但通常足以进行 gzip 压缩和解压缩。在大多数情况下,瓶颈将是网络连接,因此 gzip 压缩当然有用。不过,在极少数情况下,情况恰恰相反。

您只需要使用一点常识来看看我的答案是否适用于您的特殊情况;-)

It always depends on where your bottleneck is.

  • If it is a very weak cpu, anything
    that puts a bigger burden on it is
    bad.
  • If is your network connection,
    compressed data transfer is a huge
    performance boost.
  • The strain on the battery should be negilible in any case

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 ;-)

2024-09-12 18:42:50

您可能还想研究的一个问题是您正在考虑的移动浏览器是否支持压缩。例如,我刚刚检查了我的 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文