News for hackers. Stuff that matters.
Re:Ask HN: LZ4 was not added as an optional compressor in HT... by DiabloD3 on Wednesday May 06, 2015 @08:41PM (#9502697)
Memory usage isn't that big of a concern anymore, not when phones ship with 1 or more GB of memory regularly.

And that doesn't answer my question: I'm okay with gzip also being allowed, but the whole entire reason we allow multiple compressors is so the web browser and the web server can negotiate what features are supported.

Low memory HTTP clients, yes, can continue to use gzip. But the rest of us, why are we not using LZ4? I mean, hell, there is no reason why HTTP 1.0 and 1.1 clients can't also support LZ4 as well: they just have to negotiate for the feature.

Re:Ask HN: LZ4 was not added as an optional compressor in HT... by gumby on Wednesday May 06, 2015 @09:36PM (#9502853)
> Memory usage isn't that big of a concern anymore, not when phones ship with 1 or more GB of memory regularly.

Memory access costs power and time (which = power too).

Re:Ask HN: LZ4 was not added as an optional compressor in HT... by DiabloD3 on Thursday May 07, 2015 @04:03AM (#9503801)
Yes it does, but does it cost more than the CPU power used by gzip vs the memory access cost of lz4? I suspect the CPU cost is more by at least a magnitude (although I can't measure it, but I bet Google has frameworks for Android to).
Re:Ask HN: LZ4 was not added as an optional compressor in HT... by stephenr on Thursday May 07, 2015 @02:38AM (#9503593)
I don't want my browser on my phone to require a gb of memory thank you very much.

It's bad enough that desktop browsers like chrome are complete memory hogs without stuff like this, I hate to imagine what a phone browser would be like if "fuck it, modern phones have heaps of resources" was the approach to all decisions.

Next you'll be suggesting a compression algorithm that only works anywhere near realtime when it has 8x1ghz+ cores to spread the work over.

Re:Ask HN: LZ4 was not added as an optional compressor in HT... by DiabloD3 on Thursday May 07, 2015 @04:05AM (#9503806)
Your phone won't require it. It will temporarily use slightly more memory (12MB is very little on modern Android phones), and it would decrease the time required to render the page (due to less CPU power required to compress then decompress over gzip -1).
Re:Ask HN: LZ4 was not added as an optional compressor in HT... by tandemstrong on Thursday May 07, 2015 @05:47AM (#9503991)
Well, it will use much less than that. The real "memory cost" of decompression will be : + compressed size

and that's it. Decompression doesn't use any memory, only the I/O buffers.

On the compression side, the memory cost is : + buffer for compression (typically == size of data to compress) + 16 KB for tables

And that's it.

We are very very far from the 12 MB mentioned.

Re:Ask HN: LZ4 was not added as an optional compressor in HT... by stephenr on Thursday May 07, 2015 @05:13AM (#9503930)
My concern is with your general concept of:

> Memory usage isn't that big of a concern anymore