hashsplit / hashsplit-spec

The Unlicense
7 stars 3 forks source link

Fix some off-by-one errors. #16

Closed bobg closed 4 years ago

bobg commented 4 years ago

While beginning to draft some language for the "Tree Construction" section I discovered some inconsistencies in how chunk boundaries are described. Sometimes I(X) is the number of bytes in the chunk (e.g. "Smax >= i >= Smin") and sometimes it's the index of the last byte in the chunk ("Y = <X0, ..., Xi>").

I changed it so that I(X) is consistently the number of bytes in a chunk. I also created a definition for P(X), the prefix of X, i.e., the first chunk in X, which I intend to use in the definition of a tree but also used to simplify the definition of SPLITc(X).

(Please double-check this carefully. It's late and it's been a long day with weird apocalyptic orange skies you may have heard about, here in Northern California; I could easily have gotten this wrong.)