Cache Key Builder
Feeds the inputs and parameters of one stage output into its CacheKey.
Every value goes in under a name, unique within the key, and is encoded unambiguously: a type tag, then fixed-width numbers or length-prefixed bytes. So "ab", "c" and "a", "bc" hash differently, as do an Int and a Long of the same value, or a 2×3 and a 3×2 raster of the same pixels. The names stage and version are taken by CacheKey.of itself.
Functions
An upstream stage's output, by its key: the key already covers everything that output came from.
A raster: its size and every pixel.
A flag.
Raw bytes.
By bit pattern, so every NaN is one value and 0.0 and -0.0 are two.
A 32-bit integer.
A 64-bit integer.
A string, as UTF-8 bytes.
A parameter model, by its canonical JSON. Every field reaches the key, defaults included, so a field added to the model later can never be left out of it. The model must not hold a collection whose iteration order is unspecified, such as a HashMap.