Multiple choiceQuestion 1 · Recall
Loading…
By the end you can describe how a vector graphic can be compressed, both losslessly and lossily, and explain why the bitmap tricks don't apply.
A vector graphic isn't a grid of pixels. It's a drawing list of drawing objects and their properties: "circle here, this big, this colour".
So RLE on pixels and lowering the resolution have nothing to work on. Instead, you compress the drawing list itself.
Most vector files are already small. But a detailed map, a technical drawing or a complex illustration can hold thousands of objects and hundreds of thousands of coordinates, and they're sent across the web all the time.
A drawing list is data, often stored as text, so the lossless ideas you've met all work on it:
circle or line colour become short indexes, or with RLE wherever the data contains runs.The decompressor can expand every reference back, so no data is lost.
Worked example: Three circles, one style
Compress this drawing list losslessly.
circle centre (40, 50) radius 12
fill colour red line colour black line thickness 2
circle centre (90, 50) radius 12
fill colour red line colour black line thickness 2
circle centre (140, 50) radius 12
fill colour red line colour black line thickness 2