Skip to content

grampelberg/scala-bencode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Scala-Bencode

A simple library that I wrote to parse and generate bencoded data. This uses the really awsome scala combinator parsing libraries and is supposedly stream based. All the rep* methods are based off while loops instead of recursion to make sure the recursion limit of the JVM isn't reached.

To use the decoder:

import org.saunter.bencode._

// Use your input library of choice.
import scalax.io._

val my_obj = BencodeDecoder.decode(
    InputStreamResource.file("test.torrent").reader.slurp)

For the encoder:

import org.saunter.bencode._

val encoded_str = BencodeEncoder.encode(List("foo", 10))

About

A navitve bencode library for scala

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages