File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 11# kotlinx-serialization-bencode
22
3- A Kotlin serialization codec used to encode/decode bencoding format.
3+ A Kotlin serialization codec for bencoding format. (Bittorrent)
44
5- 🚧WIP : Currently only decoder is implemented.🚧
5+ 🚧Note : Currently only decoder was implemented.🚧
66
77Reference: [ https://www.bittorrent.org/beps/bep_0003.html ] ( https://www.bittorrent.org/beps/bep_0003.html )
88
99## Usage
10+
11+ Add the dependency to your ` build.gradle.kts `
12+ ``` kotlin
13+ dependencies{
14+ implementation(" space.iseki.bencoding:kotlinx-serialization-bencoding:0.1.0" )
15+ }
16+ ```
17+
1018``` kotlin
1119@Serialization
12- data class Meta (val announce : String )
20+ data class Meta (val announce : String ) // The torrent file format
1321
14- fun foo (input : InputStream ){
15- println (input.decodeBencode <Meta >())
22+ fun foo (input : InputStream ) {
23+ println (input.decodeInBencoding <Meta >())
1624}
1725```
26+
You can’t perform that action at this time.
0 commit comments