mapbox / mapbox/osmpbf-tutorial

Warn about the multiple bytes fields (writingprogram, source, osmosis_replication_*...)

オープン
#4 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
言語のデータがありません
スター
23
フォーク
3
PR マージ指標
30日以内にマージされた PR はありません

説明

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 ;)

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

この issue ではファイルもテストも指定されていません。fieldwire と size を説明しているチュートリアルのセクションを見つけ、フィールド番号が 15 を超える場合は追加の varint バイトを使用することを、writingprogram (16) と source (17) を例として文書化してください。追加のバイトとデコードの動作が読者に明確になれば完了です。

索引モデルが issue の本文から書いたものです。

評価

領域
documentation
issue の種類
ドキュメント
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。