Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

decode without using the entire input

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

@ckcr4lyf がすでに取り組んでいます。

2024年4月1日 から。

  • #179 @ckcr4lyf による — オープン

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
javascript
領域
backend

調査の方向性

decode のエントリポイントから始め、複数の bencoded パートを含む、提供された JavaScript の例を再現します。この issue では、最初のパートを返すのか、例外を発生させるのか、別の動作にするのかが決まっていないため、完了には末尾の入力に対する動作を確定し、それをどのように伝えるかについて合意することが必要です。

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

説明

enhancement

Not sure if this is a bug or not but I'd like to discuss how decode should behave when we feed multiple parts.

Example:

bencode.decode('i123ei123e', 'utf8'); // 123

The input has more data than that. When we use the decode function, it silently returns just the first decoded part. Is this intended?

I saw some cases where a single buffer they wanted to decode had multiple bencoded parts (it was some data received from the network they had no control over). And when they used this lib, it was silently missing parts. So they had to implement some logic to check if the decoded result was everything the input had or not. They managed to get everything working, but I'm wondering if the lib should give a heads up (exception or whatever) when this happens.

主要言語
JavaScript
スター
173
フォーク
38
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

webtorrent/node-bencode のほかの issue

webtorrent/node-bencode の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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