All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
...
- 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. IfIsPrivate
is false then0
is output instead of1
- Always set
- Merged PR #60
- Escape tracker URLs in magnet links
4.0.0 - 2021-01-23
- Changed supported frameworks to:
- .NET Standard 2.0
- .NET Standard 2.1
- .NET Core App 2.1
- .NET 5.0
Torrent.Pieces
can now only be set to an array with a length which is a multiple of 20.
3.1.4 - 2020-03-06
- Issue parsing torrents without both
name
andname.utf-8
field (#47) - Exception when accessing properties
FullPath
andFullPathUtf8
onMultiFileInfo
ifPath
/PathUtf8
is null (#47)
3.1.3 - 2020-03-03
- Added
Torrent.DisplayNameUtf8
andMultiFileInfoList.DirectoryNameUtf8
, both mapped to thename.utf-8
field
- New UTF-8 fields are now also added to
BDictionary
created byTorrent.ToBDictionary
(and used by encode methods)
Torrent.NumberOfPieces
is now correctly calculated by dividing by 20 instead ofPieces.Length
(introduced in 3.1.0) (#48)
3.1.0 - 2020-02-28
- Added
FileNameUtf8
andPathUtf8
andFullPathUtf8
properties toSingleFileInfo
/MultiFileInfo
(#47)- These properties reads from the
name.utf-8
andpath.utf-8
fields.
- These properties reads from the
Torrent.NumberOfPieces
now usesPieces.Length
instead ofTotalSize
for the calculation (#48)
3.0.1 - 2019-10-17
- Fixed missing parser for
Torrent
(#44)
3.0.0 - 2019-10-13
There 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.
- Implemented parsing/encoding using
PipeReader
/PipeWriter
- Added
BencodeReader
as replacement forBencodeStream
- Added
IBObject.GetSizeInBytes()
method, returning the size of the object in number of bytes.
- Improved parsing/encoding performance
- Reduced memory allocation on parsing/encoding
- Made
BString
,BNumber
,BList
andBDictionary
classessealed
- Made parse methods of
BencodeParser
virtual so it can be overriden if needed by anyone - Constructor
BString(IEnumerable<byte> bytes, Encoding encoding = null)
changed toBString(byte[] bytes, Encoding encoding = null)
- Exposed value type of
BString
changed fromIReadOnlyList<byte>
(byte[]
internally) toReadOnlyMemory<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 ofTorrentParserMode.Strict
- Torrent related classes moved to
BencodeNET.Torrents
namespace
- Removed
BencodeStream
and replaced withBencodeReader
- 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 onlyBencodeParser(Encoding encoding = null)
and addedBencodeParser.Encoding
property to enable changing encoding. Parsers can still be added/replaced/removed throughBencodeParser.Parsers
property.
- Parsing from non-seekable
Stream
s is now possible - Fixed issue parsing torrent files with non-standard 'announce-list' (#39)
2.3.0 - 2019-02-11
- Added
BNumber
casting operators toint?
andlong?
2.2.9 - 2017-08-05
- Added tolerant parse mode for torrents, which skips validation
- Save original info hash when parsing torrent
- Try to guess and handle timestamps in milliseconds in 'created' field
- Handle invalid unix timestamps in 'created' field
2.2.2 - 2017-04-03
BList.AsNumbers()
methodTorrent.PiecesAsHexString
property- Attempt to use .torrent file encoding when parsing torrent itself
Torrent.Pieces
type changed tobyte[]
Torrent.Pieces
property
2.1.0 - 2016-10-07
API has been more or less completely rewritten for better use with dependency injectiom and generally better usability; albeit a bit more complex.
- .NET Standard support
1.3.1 - 2016-06-27
- Some XML documentation (intellisense)
- Better handling of
CreationDate
in torrent files
1.2.1 - 2015-09-26
- Further performance improvements when decoding strings and numbers (up to ~30% for a standard torrent file)
- XML documentation now included in nuget package
1.2.0 - 2015-09-21
- Big performance improvements when decoding
- BencodeStream.BaseStream property has been removed
1.1.0 - 2015-09-21
- Torrent file abstractions including method to calculate info hash of a torrent file