Encode and decode bencoded data
The groovy files are just copies of the java files, so either copy the files, use grape
@Grab('be.olsson.bencoder:bencoder:0.14')
or any other framework here: http://search.maven.org/#artifactdetails%7Cbe.olsson.bencoder%7Cbencoder%7C0.14%7Cjar
The code is a clean room implementation over 10 years old (April 2003), but cleaned up a little since then.
It's most likely neither the fastest nor prettiest, but it's free as speech (BSD), not as beer (GPL).