This can be optionally implemented if a parser is able to return a partial value or for situations where the end of the stream signals a complete response
This can be optionally implemented if a parser is able to return a partial value or for situations where the end of the stream signals a complete response
Only the unknownLengthBytes parser currently uses this. It is currently undefined if calling this resets a parser's state. ">>" also uses it, but not |>
Parse a single line of data. A "line" is terminated by
\r\n
.This is quite possibly the fastest line parser in existence. While this is basically a specialized version of the bytesUntil parser, it is significantly faster. Part of the speedup is simply from basically including the functionality of the MapParser, which avoids a bunch of function calls. I believe the rest of the speedup is due to the fact that comparing the next byte to a constant vs an array member is significantly faster. I have made several attempts to get the bytesUntil parser as fast as this one to no avail.