> Notice how the decoded values give relative positions, each value represents the difference from the previous position, not absolute coordinates. This is crucial: instead of encoding large column numbers like 27698 in minified files, source maps only store small deltas like +7 or +15, making the encoded strings much more compact.
Wouldn't "offset" be a more apt term?
manojvivek•4h ago
To me, “offset” sounds more like the distance from the start, whereas here the values are relative to the previous segment.
Not a native english speaker, so I could be wrong.
tantalor•3h ago
Offset is difference from a starting point or a previous position
jagged-chisel•2h ago
“Offset” is not enough on its own. Offset from what? Start of file? Absolute offset. Previous offset? Relative offset.
recursive•3h ago
It sounds equally apt to my ear. I've used both words for this concept in the past.
hanikesn•1h ago
Delta Encoding is the common term
zb3•2h ago
Tangentially related, but last year I've made a tool to recover original sources from web apps which expose source maps (with the sourcesContent value present), including enumerating all lazily loaded chunks:
tantalor•4h ago
Wouldn't "offset" be a more apt term?
manojvivek•4h ago
tantalor•3h ago
jagged-chisel•2h ago
recursive•3h ago
hanikesn•1h ago