top | item 31117753

(no title)

e____g | 3 years ago

brotli helps:

  $ echo '<svg xmlns="http://www.w3.org/2000/svg" height="256" width="256" viewBox="0 0 1 1"><circle r="2" fill="#aad3df"/></svg>' | brotli -9 - | wc -c
  93

discuss

order

im3w1l|3 years ago

Couldn't resist trying to go further. We can use an implicit viewBox.

  $ echo '<svg xmlns="http://www.w3.org/2000/svg" height="256" width="256"><circle r="1000" fill="#aad3df"/></svg>' | brotli -9 - | wc -c
  83
r="1000" hits brotlis built-in dictionary, but if you target zlib then r="2566" is better.

dchest|3 years ago

You can also drop the new line character by using echo -n, which gives 82 bytes :)

pbhjpbhj|3 years ago

Can you use a short closing tag "</>" or implicit closure?