Releases: danieltmbr/Bencode
Releases · danieltmbr/Bencode
Separated parsing
Improvements
- Parsing mechanism is separated into
Bencoder
class- You can decode with
Bencoder
like:try Bencoder().decode(from: FILEURL)
. - You can still use convinient initialisers of
Bencode
enum like before.
- You can decode with
- Custom parsing errors are provided
Fixes
- Index counting at parsing was used incorrectly which could have caused failing parsing.
Bencode 1.4.0
Improvements
- Performance enhancement
- Access string byte array
Bencode 1.3.1
New feature
- Properties of BencodeKey are now public
Bencode 1.3.0
New feature
- Encode Bencoded data to
Swift.Data
usingascii
encoding.
Access it bybencode.asciiEncoding
Bencode 1.2.2
Bugfix
- Encoding string had a bug. Had... ;)
Removed closing"e"
character from encoded string.
Bencode 1.2.1
Bugfix
- Pretty-print
debugDescription
contained both of BencodeKey's properties.
Fixed: Now it prints original key only.
Bencode 1.2.0
New feature
- Preserve original order in dictionaries as well when encoding a decoded file.
Bencode 1.1.0
New features
- Bencode & BencodeOptional is a Sequence now. (Operates on dictionaries or lists)
- Added new accessors:
- Access dictionary by
.dict
(optional) - Access list by
.list
(optional) - Access values of dictionary or list by
values
- Access dictionary by
Bencode 1.0.0
Feature list
- Encode to string
- Decode from string or url
- Convenient access to (optionals):
- Integer value by
bencode.int
- String value by
bencode.string
- List item by subscript
bencode[0]
- Dictionary value by subscript
bencode[key]
- Integer value by
- Pretty-printed debugDescription