Skip to content

Releases: dampcake/bencode

v1.4.2

08 May 21:09
f8aea43
Compare
Choose a tag to compare

What's Changed

  • Bump GHA actions and target supported java versions by @dampcake in #19
  • Add test for debian bttracker by @dampcake in #18
  • Bump junit to 4.13.2 and plugins to latest by @dampcake in #20
  • Fix resource leaks in stream usage with try-with-resources by @dampcake in #21
  • Cleanup test code by @dampcake in #22
  • Add missing test case from coverage report by @dampcake in #23
  • Fix README.md build badge by @dampcake in #25
  • Remove redundant check from readObject condition by @dampcake in #24
  • Remove encode conditions by using a consumer pattern by @dampcake in #26
  • Update to use new Maven Central Portal by @dampcake in #27

Full Changelog: bencode-1.4.1...bencode-1.4.2

v1.4.1

08 Jul 19:14
Compare
Choose a tag to compare

Fix #14 - Write byte[]s correctly instead of implicity calling toString() on them. Thanks @aruthane for the fix!

v1.4

08 Jun 00:52
Compare
Choose a tag to compare

Fix #12 - Properly encode multibyte codepoints. Thanks @manuel-sugawara for the fix!

v1.3.2

05 Sep 19:36
Compare
Choose a tag to compare

Fix #11 - Dictionary keys should appear in sorted order. Thanks @AndSDev for the fix!

v1.3.1

10 Apr 03:43
Compare
Choose a tag to compare

Fix for #7, thanks @lfcnassif for filing.

Allow many more types of numbers to be parsed, but will still only write/return integers (Longs) as per the bencode spec.

v1.3

22 Jul 01:51
Compare
Choose a tag to compare

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 Strings without data loss.

If useBytes is true:

  • List and Map values (not keys in Maps) will not be coerced into a String value but instead be kept as binary data in a ByteBuffer.
  • ByteBuffer is now understood by the BencodeOutputStream and will be added as byte string data.
  • New methods added for writing/reading ByteBuffers added.

If useBytes is false:

  • List and Map values will continue to be coerced into Strings.

v1.2.2

22 Jul 01:38
Compare
Choose a tag to compare

Preserve key order by returning a LinkedHashMap. #6
This should work better when working with torrents as hashes should be able to be computed correctly more often.

Thanks to @TheLQ for the fix.

v1.2.1

03 Sep 18:25
Compare
Choose a tag to compare

Speedup encoding by using StringBuilder instead of String.format.
See: #4

Thanks to @EonTechnology for the fix.

v1.2

13 Jul 23:01
Compare
Choose a tag to compare

Fix encoding on locales with non-arabic digits.
See: #3

Thanks to @EonTechnology for the fix.

v1.1.1

19 Sep 01:46
Compare
Choose a tag to compare

Bencode.encode() was not respecting the encoding type passed to the constructor.
See: #2

Thanks to @alepar for the fix.