webtorrent / create-torrent

Create .torrent files
https://webtorrent.io
MIT License
341 stars 94 forks source link

fix: replace filestream with fast-blob-stream #171

Closed ThaUnknown closed 2 years ago

ThaUnknown commented 2 years ago

drops filereader dep and readable-stream dep

What is the purpose of this pull request? (put an "X" next to item)

[ ] Documentation update [ ] Bug fix [ ] New feature [X] Other, please explain:

What changes did you make? (Give an overview) Replaced filestream with fast-blob-stream which is not only MILES faster, doesn't rely on buffer or readable-stream. It does however use marginally more RAM as it caches 1 piece ahead [if possible]. They are functionally the same. Which issue (if any) does this pull request address? https://github.com/webtorrent/webtorrent/issues/1971

Is there anything you'd like reviewers to focus on? Does this cause any issues on node? I don't think node has file, however it's reliance on blob which later versions of node have might be an issue as it uses w3c ReadableStream to create a node-like Readable which is implemented poorly in later node versions, so it might be misused, is this a potential issue?

welcome[bot] commented 2 years ago

🙌 Thanks for opening this pull request! You're awesome.

welcome[bot] commented 2 years ago

🎉 Congrats on getting your first pull request landed!

webtorrent-bot commented 2 years ago

:tada: This PR is included in version 5.0.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket: