Comment by cogman10
7 hours ago
If you wanted to play around and do something a little more challenging (though you'd be bulking up the javascript) then one thing you could do is play with a bespoke html compression. You could store the tags in 4 bits `0001` first bit, tag open or close, and the remaining 3 bits indicate which tag is being used (div/p/b/h1/etc). With at least one of the values like `0111` indicating text is following and another tag like `1111` indicating that an unsupported tag follows.
If you extend it out to 8 bits you can pretty nearly store all the html tags (it'd give you 256 tags to play with).
No comments yet
Contribute on Hacker News ↗