logoalt Hacker News

tantalor11/04/20256 repliesview on HN

> 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?


Replies

manojvivek11/04/2025

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.

show 1 reply
hanikesn11/04/2025

Delta Encoding is the common term

show 1 reply
accrual11/04/2025

In this case I feel it's like six of one and a half-dozen of the other.

Delta definition 4: (mathematics, physics, engineering) The symbol Δ; A change in a quantity, likely from "d" for "difference"

Offset definition 7: The distance by which one thing is out of alignment with another.

Got these from Wiktionary:

* https://en.wiktionary.org/wiki/delta

* https://en.wiktionary.org/wiki/offset

recursive11/04/2025

It sounds equally apt to my ear. I've used both words for this concept in the past.

paulddraper11/04/2025

Delta and offset mean the same thing — the difference between two amounts.

Delta is perhaps slightly more obscure outside of a math setting. Perhaps.

show 1 reply