mapbox / mapbox/osmpbf-tutorial
Warn about the multiple bytes fields (writingprogram, source, osmosis_replication_*...)
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 23
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I think it could be good to warn when a field number exceeds 15, it **needs more bytes** to be encoded exactly like varints.
It happens for example on the **writingprogram** field ( = 16) which is encoded on two bytes **0x82 0x01**.
MSB here is reserved to indicate the value also encoded on the next byte.
Decoding it like a varint is the way.
Also on **source** field ( = 17), and basically every field number greater than 15.
It personnaly took a while to understand why there was another byte between fieldwire and size and I think it'll be great to write it down to help a byte more ;)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not name a file or test. Locate the tutorial section explaining fieldwire and size, then document that field numbers above 15 use an additional varint byte, using writingprogram (16) and source (17) as examples. Done means the extra byte and decoding behavior are clear to readers.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100