Releases: dampcake/bencode
v1.4.1
v1.4
Fix #12 - Properly encode multibyte codepoints. Thanks @manuel-sugawara for the fix!
v1.3.2
v1.3.1
Fix for #7, thanks @lfcnassif for filing.
Allow many more types of numbers to be parsed, but will still only write/return integers (Long
s) as per the bencode spec.
v1.3
Fix for #6, thanks @zzyandzzy for filing.
New constructor argument for Bencode
and BencodeInputStream
a boolean
called useBytes
. This is especially useful when working with torrent files as not all of the byte strings can be converted to String
s without data loss.
If useBytes
is true
:
List
andMap
values (not keys inMaps
) will not be coerced into aString
value but instead be kept as binary data in aByteBuffer
.ByteBuffer
is now understood by theBencodeOutputStream
and will be added as byte string data.- New methods added for writing/reading ByteBuffers added.
If useBytes
is false
:
List
andMap
values will continue to be coerced intoStrings
.
v1.2.2
v1.2.1
Speedup encoding by using StringBuilder instead of String.format.
See: #4
Thanks to @EonTechnology for the fix.
v1.2
Fix encoding on locales with non-arabic digits.
See: #3
Thanks to @EonTechnology for the fix.