Skip to content

Commit e6ba0cf

Browse files
deftioclaude
andcommitted
Add Kotlin and Java binding scaffolding
- Create directory structure and stub source files for Kotlin and Java bindings following the same pattern as Go/Rust/Swift - Update bindings README and main README language table - Add Kotlin and Java to v1.1 roadmap Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9d01418 commit e6ba0cf

8 files changed

Lines changed: 157 additions & 0 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ All bindings are native implementations that read/write the `.trp` format direct
108108
| Go | Not yet implemented | `bindings/go/` |
109109
| Swift | Not yet implemented | `bindings/swift/` |
110110
| Rust | Not yet implemented | `bindings/rust/` |
111+
| Kotlin | Not yet implemented | `bindings/kotlin/` |
112+
| Java | Not yet implemented | `bindings/java/` |
111113

112114
## File Format
113115

@@ -139,6 +141,8 @@ See `docs/internals/` for format details.
139141
- [ ] Go binding
140142
- [ ] Swift binding (with SPM package)
141143
- [ ] Rust binding (with crate on crates.io)
144+
- [ ] Kotlin binding
145+
- [ ] Java binding
142146
- [ ] npm package for JavaScript/TypeScript
143147
- [ ] PyPI package for Python
144148

bindings/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ They do not use FFI or call into the C library.
1111
| Go | [go/](./go/) | Not yet implemented |
1212
| Swift | [swift/](./swift/) | Not yet implemented |
1313
| Rust | [rust/](./rust/) | Not yet implemented |
14+
| Kotlin | [kotlin/](./kotlin/) | Not yet implemented |
15+
| Java | [java/](./java/) | Not yet implemented |
1416

1517
## License
1618

bindings/java/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# triepack — Java
2+
3+
Native Java implementation of the Triepack `.trp` binary format.
4+
5+
## Status
6+
7+
Not yet implemented.
8+
9+
## Build
10+
11+
```bash
12+
./gradlew build
13+
```
14+
15+
## Test
16+
17+
```bash
18+
./gradlew test
19+
```
20+
21+
## License
22+
23+
Copyright (c) 2026 M. A. Chatterjee, BSD-2-Clause.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* TriePack.java
3+
*
4+
* Native Java implementation of the TriePack (.trp) binary format.
5+
*
6+
* Copyright (c) 2026 M. A. Chatterjee
7+
* SPDX-License-Identifier: BSD-2-Clause
8+
*/
9+
10+
package com.deftio.triepack;
11+
12+
import java.util.Map;
13+
14+
/**
15+
* Encodes and decodes key-value dictionaries in the TriePack (.trp) binary
16+
* format.
17+
*/
18+
public class TriePack {
19+
20+
/**
21+
* Encodes a map of key-value pairs into the .trp binary format.
22+
*
23+
* @param data The map to encode
24+
* @return The encoded .trp binary data
25+
*/
26+
public static byte[] encode(Map<String, Object> data) {
27+
throw new UnsupportedOperationException("Not yet implemented");
28+
}
29+
30+
/**
31+
* Decodes a .trp binary blob into a map of key-value pairs.
32+
*
33+
* @param data The .trp binary data to decode
34+
* @return The decoded key-value map
35+
*/
36+
public static Map<String, Object> decode(byte[] data) {
37+
throw new UnsupportedOperationException("Not yet implemented");
38+
}
39+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* TriePackTest.java
3+
*
4+
* Copyright (c) 2026 M. A. Chatterjee
5+
* SPDX-License-Identifier: BSD-2-Clause
6+
*/
7+
8+
package com.deftio.triepack;
9+
10+
import org.junit.jupiter.api.Test;
11+
12+
class TriePackTest {
13+
14+
@Test
15+
void placeholder() {
16+
// TODO: implement tests
17+
}
18+
}

bindings/kotlin/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# triepack — Kotlin
2+
3+
Native Kotlin implementation of the Triepack `.trp` binary format.
4+
5+
## Status
6+
7+
Not yet implemented.
8+
9+
## Build
10+
11+
```bash
12+
./gradlew build
13+
```
14+
15+
## Test
16+
17+
```bash
18+
./gradlew test
19+
```
20+
21+
## License
22+
23+
Copyright (c) 2026 M. A. Chatterjee, BSD-2-Clause.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* TriePack.kt
3+
*
4+
* Native Kotlin implementation of the TriePack (.trp) binary format.
5+
*
6+
* Copyright (c) 2026 M. A. Chatterjee
7+
* SPDX-License-Identifier: BSD-2-Clause
8+
*/
9+
10+
package com.deftio.triepack
11+
12+
/**
13+
* Encodes a map of key-value pairs into the .trp binary format.
14+
*
15+
* @param data The map to encode
16+
* @return The encoded .trp binary data
17+
*/
18+
fun encode(data: Map<String, Any?>): ByteArray {
19+
TODO("Not yet implemented")
20+
}
21+
22+
/**
23+
* Decodes a .trp binary blob into a map of key-value pairs.
24+
*
25+
* @param data The .trp binary data to decode
26+
* @return The decoded key-value map
27+
*/
28+
fun decode(data: ByteArray): Map<String, Any?> {
29+
TODO("Not yet implemented")
30+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* TriePackTest.kt
3+
*
4+
* Copyright (c) 2026 M. A. Chatterjee
5+
* SPDX-License-Identifier: BSD-2-Clause
6+
*/
7+
8+
package com.deftio.triepack
9+
10+
import kotlin.test.Test
11+
12+
class TriePackTest {
13+
14+
@Test
15+
fun placeholder() {
16+
// TODO: implement tests
17+
}
18+
}

0 commit comments

Comments
 (0)