Spindle_http.RangeByte ranges, as RFC 9110 §14 writes them: a request's Range, and the Content-Range of an answer to one.
Range.parse "bytes=0-499, -500" = Ok (Bytes [ Span (0, 499); Suffix 500 ])
Range.satisfy ~length:1000 (Suffix 500) = Some (500, 999)
Range.content_range ~first:500 ~last:999 ~length:1000 = "bytes 500-999/1000"type t = | Bytes of spec listat least one
*)| Other of stringa unit this is not, lower-cased, its ranges unread
*)val parse : string -> (t, string) Stdlib.resultA Range value. A span whose last position is before its first is an Error, as §14.1.1 calls it invalid, and so is an empty list. A position too large to hold is the largest there is, which no length reaches.
val satisfy : length:int -> spec -> (int * int) optionThe first and last byte it asks for of a representation length long, the last no further than its end; None when §14.1.1 calls it unsatisfiable -- a range that starts past the end, or a suffix of nothing.
bytes first-last/length, for a 206.