4 ms·
I suppose the strategy is that, if you know your expected data types and data structures pretty well, it's benefitial to apply delta encoding before general pur
by mxfh 10y ago
I suppose the strategy is that, if you know your expected data types and data structures pretty well, it's benefitial to apply delta encoding before general purpose compression, especially for simple RLE compressors.
In graphics, delta might be better, since the glyph is offset anyway on the canvas, so when drawing, the renderer can use the diff information as-is when the last point is known to reduce the number of operations to a simple addition with smaller length numbers as opposed to absolute positioning.
It might also keep the extracted memory footprint low since you might be able to get away with less bits per encoded change in a typed array data structure.
Still wonder if Mapbox ever did some size and speed benchmarking of general purpose compressed raw signed integers vs. their zig-zag and delta encoded vector tile geometries.
https://github.com/mapbox/vector-tile-spec/issues/35#issue-108880792 https://github.com/mapbox/vector-tile-spec/issues/35#issue-1...