protocolbuffers / protocolbuffers/protocolbuffers.github.io

Encoding Repeated Elements Discussion Wrong

Open
#293 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
69
Forks
179
PR merge metrics
No merged PRs in 30d

Description

I'm brand new to Protobuf, so maybe I have this all wrong, but as best as I could make out, including by experimentation using protoc, the documentation on the encoding of repeated elements is wrong.

It says that if we "construct a Test4 message with d set to "hello", and e set to 1, 2, and 3, this could be encoded as 3206038e029ea705, or written out as Protoscope:"

4: {"hello"}
6: {3 270 86942}

First, the encoding given appears to be just for the values of e, not for the entire Test4 message.
Second, it appears the encoding is for e being set to 3, 270, and 86942, not 1, 2, and 3.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the documentation containing the quoted Test4 and repeated-elements example, then reproduce it with protoc as described in the issue. Verify whether the byte sequence and Protoscope values match the stated message, and update the example and explanatory text so they agree.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.