Skip to content

Commit 4c5ae44

Browse files
committed
docs: add package.md as dokka api landing page
1 parent 29143ea commit 4c5ae44

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ kotlin {
3939

4040
dokka {
4141
dokkaSourceSets.configureEach {
42+
includes.from("package.md")
4243
sourceLink {
4344
localDirectory.set(projectDir.resolve("src"))
4445
val sub = projectDir.relativeTo(rootDir).invariantSeparatorsPath

package.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Module kencode
2+
3+
# Package com.eignex.kencode
4+
5+
Start here to find your way around the API. Three entry points cover the
6+
common tasks; everything else in the symbol list supports them.
7+
8+
| Start with | When you want to |
9+
|---|---|
10+
| [EncodedFormat] | Turn a `@Serializable` type into a short string, and back. |
11+
| [PackedFormat] | Get the compact `ByteArray` without the text layer. |
12+
| [ByteEncoding] | Encode raw bytes with a codec directly — [Base62], [Base36], [Base64], [Base85]. |
13+
14+
```kotlin
15+
val encoded = EncodedFormat.encodeToString(payload)
16+
val decoded = EncodedFormat.decodeFromString<Payload>(encoded)
17+
```
18+
19+
Configure a format through its builder lambda: swap the [codec][EncodedFormatBuilder.codec],
20+
add a [checksum][EncodedFormatBuilder.checksum], or chain [PayloadTransform]s.
21+
On the packed side, annotate `Int`/`Long` fields with [PackedType] and
22+
[IntPacking] to opt into varint or ZigZag.

0 commit comments

Comments
 (0)