Skip to content

Releases: Krusen/BencodeNET

v5.0.0

30 Mar 18:17
Compare
Choose a tag to compare

Changed

  • Added target framework .NET 6
  • Removed the following target frameworks and any associated conditional code:
    • .NET Standard 2.0
    • .NET Standard 2.1
    • .NET Core App 2.1
    • .NET 5.0
  • Upgraded dependency System.IO.Pipelines from 5.0.1 to 6.0.3
  • Switched a use of MemoryPool to ArrayPool
  • Merged PR #56
    • Always set private field in torrent. If IsPrivate is false then 0 is output instead of 1
  • Merged PR #60
    • Escape tracker URLs in magnet links

Commits:

  • 161e817 Merge branch 'v5'
  • 90773e2 Update changelog for v5
  • da8cfff Fix test for empty torrent ToBDictionary
  • 746b835 Install gitversion during pipeline
  • b095eee Use bitshifting to simplify enum flag values
  • 670003c Add test for trackers being escaped in magnet link
  • 6784cfe Update to .NET 6 and C# 11
  • f5382dd Use ArrayPool instead of MemoryPool
  • 7b6e51c Merge remote-tracking branch 'v0l/master'
  • 0bec972 Merge remote-tracking branch 'lAnubisl/bug/55-some-trackers-require-private0-to-be-set-explicitly'
See More
  • 592b20f Uri encode tracker urls in magnet links
  • d8b1438 Set Private: 0 to the torrent properties when IsPrivate == false

This list of changes was auto generated.

v3.1.4

25 Jan 20:15
Compare
Choose a tag to compare

Changes:

  • 33a31cb Update build number during build
  • 912cee8 Fix build package version
  • 8597232 Fix azure build
  • d28928e Skip building again for tests
  • 90801da Merge branch 'feature/azure-pipelines'
  • 5c37b6e Move build to Azure Pipelines
  • c831fb1 Fix missed uses of InlineAutoMockedData attribute
  • 99371cd Update version in cake build
  • aeade9e Merge branch 'feature/net50'
  • c0f1313 Update changelog for v4.0.0
  • 79a3412 Update to simplified version of AutoMockedDataAttribute
  • 783b084 Update packages in test project
  • 2d7d1cd Update Torrent.Pieces property with null-check and multiple of 20 check
  • 97fd37a Update changelog
  • bec1f72 Use new C# syntaxes here and there
  • df40d11 Avoid initializing new empty array
  • 99c0745 Add missing doc for DisplayNameUtf8
  • fb1f6bd Update target frameworks to latest .NET versions

This list of changes was auto generated.

v3.1.4

06 Mar 20:24
Compare
Choose a tag to compare

Fixed

  • Issue parsing torrents without both name and name.utf-8 field ([#47])
  • Exception when accessing properties FullPath and FullPathUtf8 on MultiFileInfo if Path/PathUtf8 is null ([#47])

v3.1.3

03 Mar 06:26
Compare
Choose a tag to compare

Added

  • Added Torrent.DisplayNameUtf8 and MultiFileInfoList.DirectoryNameUtf8, both mapped to the name.utf-8 field

Changed

  • New UTF-8 fields are now also added to BDictionary created by Torrent.ToBDictionary (and used by encode methods)

Fixed

  • Torrent.NumberOfPieces is now correctly calculated by dividing by 20 instead of Pieces.Length (introduced in 3.1.0) (#48)

v.3.1.0

03 Mar 06:25
Compare
Choose a tag to compare

Added

  • Added FileNameUtf8 and PathUtf8 and FullPathUtf8 properties to SingleFileInfo/MultiFileInfo (#47)
    • These properties reads from the name.utf-8 and path.utf-8 fields.

Changed

  • Torrent.NumberOfPieces now uses Pieces.Length instead of TotalSize for the calculation (#48)

v3.0.1

17 Oct 10:23
Compare
Choose a tag to compare

Fixed

  • Fixed missing parser for Torrent (#44)

v3.0.0

13 Oct 14:52
Compare
Choose a tag to compare

here is a few changes to the public API, but most people shouldn't be affected by this unless they have extended/overriden functionality.
Basic usage should not see any or only minor changes compared to v2.3.0.

Implemented async support for parsing/encoding.

Added build targets for .NET Core 2.1 and .NET Core 3.0 to take advantage of performance improvements
in Stream and Encoding APIs for .NET Core 2.1 or later.

Rewrite of internal parsing for better performance, taking advantage of new Span<T>/Memory<T>
types - faster parsing and less memory allocation.

Removed support for .NET Framework 4.5 and .NET Standard 1.3.
Lowest supported versions are now .NET Framework 4.6.1 (4.7.2 highly recommended) and .NET Standard 2.0.

Added

  • Implemented parsing/encoding using PipeReader/PipeWriter
  • Added BencodeReader as replacement for BencodeStream
  • Added IBObject.GetSizeInBytes() method, returning the size of the object in number of bytes.

Changed

  • Improved parsing/encoding performance
  • Reduced memory allocation on parsing/encoding
  • Made BString, BNumber, BList and BDictionary classes sealed
  • Made parse methods of BencodeParser virtual so it can be overriden if needed by anyone
  • Constructor BString(IEnumerable<byte> bytes, Encoding encoding = null) changed to BString(byte[] bytes, Encoding encoding = null)
  • Exposed value type of BString changed from IReadOnlyList<byte> (byte[] internally) to ReadOnlyMemory<byte>
  • Removed parse method overloads on IBencodeParser and added matching extension methods instead
  • Removed encode method overloads on IBObject and added matching extension methods instead
  • Torrent parse mode now default to TorrentParserMode.Tolerant instead of TorrentParserMode.Strict
  • Torrent related classes moved to BencodeNET.Torrents namespace

Removed

  • Removed BencodeStream and replaced with BencodeReader
  • Dropped .NET Standard 1.3 support; .NET Standard 2.0 is now lowest supported version
  • Dropped .NET Framework 4.5 support; .NET Framework 4.6.1 is now lowest supported version (but 4.7.2 is highly recommended)
  • Removed most constructors on BencodeParser leaving only BencodeParser(Encoding encoding = null) and
    added BencodeParser.Encoding property to enable changing encoding. Parsers can still be added/replaced/removed
    through BencodeParser.Parsers property.

Fixed

  • Parsing from non-seekable Streams is now possible
  • Fixed issue parsing torrent files with non-standard 'announce-list' (#39)

v2.3.0

11 Feb 17:18
Compare
Choose a tag to compare
  • Added BNumber casting operators to int? and long?

v2.2.9

05 Aug 11:55
Compare
Choose a tag to compare

Add tolerant parse mode for torrents that skips validation
Handle invalid unix timestamps in 'created' field
Try to guess and handle timestamps in milliseconds in 'created' field

v2.2.2

03 Apr 15:01
Compare
Choose a tag to compare
  • Added Torrent.PiecesAsHexString property
  • Fixed Torrent.Pieces and changed to byte[]
  • Attempt to use .torrent file encoding when parsing the torrent itself
  • Added BList.AsNumbers() method