Skip to content

Commit 3c762a4

Browse files
authored
Update README.md
1 parent 7ef3170 commit 3c762a4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ dependencies {
5252
// For serialization support
5353
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.9.0")
5454
}
55-
````
55+
```
5656

5757
You also need to load the serialization plugin.
5858

@@ -71,7 +71,7 @@ data class Payload(
7171
@VarInt
7272
val delta: Int, // zig-zag + varint
7373

74-
val urgent: Boolean, // joined to bitset
74+
val urgent: Boolean, // joined to bitset
7575
val sensitive: Boolean,
7676
val external: Boolean,
7777
val handled: Instant?, // nullable, tracked via bitset
@@ -126,7 +126,6 @@ Decoding is symmetric:
126126

127127
```kotlin
128128
val back = Base62.decode("2BVj6VHhfNlsGmoMQF")
129-
assert(back.contentEquals(bytes))
130129
```
131130

132131
---
@@ -137,7 +136,6 @@ For more complex payloads (nested types, lists, maps) use `ProtoBuf` as the
137136
binary format and still get compact, ASCII-safe strings:
138137

139138
```kotlin
140-
141139
@Serializable
142140
data class ProtoBufRequired(val map: Map<String, Int>)
143141

@@ -155,6 +153,10 @@ val decoded = format.decodeFromString<ProtoBufRequired>(encoded)
155153
assert(decoded == payload)
156154
```
157155

156+
This example relies on kotlinx protobuf implementation:
157+
```kotlin implementation("org.jetbrains.kotlinx:kotlinx-serialization-protobuf:1.9.0")
158+
````
159+
158160
---
159161

160162
## Encryption

0 commit comments

Comments
 (0)