core-wg / href

Other
2 stars 0 forks source link

pet: Allow bytes, make non-zero #19

Closed chrysn closed 2 years ago

chrysn commented 2 years ago

Bytes allow covering the full set of URI oddities.

.ne '' is an easy measure against needlessly chunked strings.

Closes: https://github.com/core-wg/href/issues/17


Some more could be done in analogy to the non-zeroness for the regular strings (forcing this to be minimally encoded), but not sure it's worth the verbosity. (In particular, the first repetition would become special in that it allows a zero-length zeroth component, and (by being nonoptional) also ensuring the pet doesn't degrade into a single-element array that could just as well have been a text).

chrysn commented 2 years ago

Merging this as I'm about to create some PET vectors, and not doing binary right away would either mean inconsistency between text or examples or needless work.