Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For anyone interested in compact vector graphics, SWF (Macromedia/Adobe Flash) has a shape format which is also similarly efficient and might be even smaller, since it doesn't restrict things like coordinates and colour indices to multiples of bytes --- fields are bit-aligned.

SVG is ridiculously bloated in comparison. Even PostScript and PDF are more efficient.



SVG is a strange combination of really bloated and not easily human readable. Try to make sense of shape data sometime. I'd expected a XML list of points but it's nothing that clear, it's a string of letters and numbers as an attribute of a tag. It may very well be readable if you learn the language but it's certainly not self describing as I would have expected from an XML format.


I'd expected a XML list of points but it's nothing that clear, it's a string of letters and numbers as an attribute of a tag

It's like they actually noticed how much more bloat would result from making each point an element, so instead they just decided to dump what is essentially bastardised PDF/PostScript path data into an attribute. The "language" also doesn't match PDF exactly, despite using a similar style of short 1-letter commands.

Compare:

https://www.w3.org/TR/SVG/paths.html

http://www.websupergoo.com/helppdfnet/source/4-examples/17-a...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: