Subject: [Cbor] Review of draft-bormann-cbor-sequence

From: Jim Schaad <[email-masked]>
Date: Tue, 14 May 2019 19:56:45 -0700

1.  Introduction:  I think that I need a little bit more description of what
you consider to be a streaming parse/encoder.   At a minimum one would
potentially need to the ability to run a parser and recover from an error
where not enough bytes exist to try again after more bytes show up.  To me
that is a variant of a streaming parser.

2.  Section 2 - Definition of  a CBOR Sequence:  This took me a couple of
times to realize that this was being defined in a recursive manner.  I think
that making this more explicit would be good.

3.  Section 2 - I think that I would remove the parenthesis in the third
paragraph.  This is almost the entire paragraph.

4. Section 2 - For second decoding bullet.  This is describing a single pass
decoding, it is probably worth describing a streaming decoding at this point
as well.

5.  Section 2 - A program, not the decoder, may also be able to recover by
decoding individual fields looking for a pattern that matches an expected
structure.  As an example, looking for a byte which corresponds to an array
of 3 items and then test decoding to see if it works and continue from that
point.

6.  Section 2 - The phrase "truncation of the last"  to me reads as the same
as the last data item is missing.  A better term might be "truncation inside
of the last" as that implies it is inside of the last item and not the last
item in its entirety.   It may also be worth while to note that this is only
true with known fixed length inputs and not with streamed input.

7.  Section 3 - The first paragraph starting with "It SHOULD" does not scan.
Please re-write

8.  Section 2 - It may be worthwhile to explicitly state that there is no
end of record indicator as well.  This is implied but not explicitly said.

Jim