Earlier quoted context omitted.
> - I optimized for compression by doing things the same way everywhere; e.g. I always put the class attribute first in my tags Compression algorithms can do a better job when they're domain-aware. An HTML-aware algorithm could compress HTML much better than a general-use plain-text compression algorithm, without requiring the user to do things like put the class attribute first. Of course, that also requires the de…
> that also requires the decompression algorithm to be similarly aware, which can be a problem if you're distributing the compressed bits widely. Well not necessarily... An HTML-aware algorithm could for example rearrange attributes in the same order everywhere because it knows it doesn't matter . Actually that would be a nice addition to the HTML "compressors" out there.
As much Stack Overflow as possible in 4096 bytes
21–30 of 77 posts
Re: As much Stack Overflow as possible in 4096 bytes
#22I'd love to see a general list of techniques you use, as best practices.
Re: As much Stack Overflow as possible in 4096 bytes
#234096 is a good goal, but there is a much more obvious benefit at 1024 since it would fit within the IPv6 1280 MTU (i.e. a single packet). I recall hearing stories that the Google Homepage had to fit within 512 bytes for IPv4's 576 MTU.
Re: As much Stack Overflow as possible in 4096 bytes
#24Some of the workarounds he mentions at the end of his Trello in 4096 bytes[1] post seem really interesting: - I optimized for compression by doing things the same way everywhere; e.g. I always put the class attribute first in my tags - I wrote a utility that tried rearranging my CSS, in an attempt to find the ordering that was the most compressible [1] http://danlec.com/blog/trello-in-4096-bytes
http://code.google.com/p/closure-compiler/wiki/FAQ#Closure_C...
Re: As much Stack Overflow as possible in 4096 bytes
#25Code is formatted in a serif font, instead of monospace, which seems like a rather important difference. Otherwise, it is quite impressive.
Re: As much Stack Overflow as possible in 4096 bytes
#26Some of the workarounds he mentions at the end of his Trello in 4096 bytes[1] post seem really interesting: - I optimized for compression by doing things the same way everywhere; e.g. I always put the class attribute first in my tags - I wrote a utility that tried rearranging my CSS, in an attempt to find the ordering that was the most compressible [1] http://danlec.com/blog/trello-in-4096-bytes
> - I optimized for compression by doing things the same way everywhere; e.g. I always put the class attribute first in my tags Compression algorithms can do a better job when they're domain-aware. An HTML-aware algorithm could compress HTML much better than a general-use plain-text compression algorithm, without requiring the user to do things like put the class attribute first. Of course, that also requires the de…
Re: As much Stack Overflow as possible in 4096 bytes
#27Earlier quoted context omitted.
Now that we have blisteringly fast computers, it's worth it to browse old websites and see what "snappy" looks like. http://info.cern.ch/hypertext/WWW/TheProject.html If we could cram more modern functionality into say...twice or three times the performance of the above, I think the web would be a better place. Instead the web is a couple orders of magnitude slower.
Yes. In some ways I think we're still in a very primative kind of level for web development. Either you do it by hand, tweaking each individual parameter like the old demoscene, and making it fast and amazingly small, or else you write huge chunky slow web apps, or more usually, something in the middle. I feel like the big thing I'm missing is smart compilers that can take web app concepts, and turn them into extreme…
Re: As much Stack Overflow as possible in 4096 bytes
#28Earlier quoted context omitted.
> that also requires the decompression algorithm to be similarly aware, which can be a problem if you're distributing the compressed bits widely. Well not necessarily... An HTML-aware algorithm could for example rearrange attributes in the same order everywhere because it knows it doesn't matter . Actually that would be a nice addition to the HTML "compressors" out there.
That's a good point. You could have an HTML-aware "precompressor" prepare the HTML for a general-use compression algorithm. However, with end-to-end HTML awareness I think you could do even better.
> Courgette transforms the input into an alternate form where binary diffing is more effective, does the differential compression in the transformed space, and inverts the transform to get the patched output in the original format. With careful choice of the alternate format we can get substantially smaller updates.
Re: As much Stack Overflow as possible in 4096 bytes
#29Re: As much Stack Overflow as possible in 4096 bytes
#30Code is formatted in a serif font, instead of monospace, which seems like a rather important difference. Otherwise, it is quite impressive.
That font family should have been
Consolas,Monaco,monospace
Rather then
Consolas,Monaco,serif
But what ever :)