use compact size for collections (I think I tried this already and it failed - but I'm going to wipe all data this time, so hopefully it works)
This commit is contained in:
parent
2aed3a670c
commit
a8337552e6
1 changed files with 2 additions and 2 deletions
|
|
@ -65,7 +65,7 @@ class KxsDataOutputEncoder(
|
||||||
descriptor: SerialDescriptor,
|
descriptor: SerialDescriptor,
|
||||||
collectionSize: Int
|
collectionSize: Int
|
||||||
): CompositeEncoder {
|
): CompositeEncoder {
|
||||||
encodeInt(collectionSize)
|
encodeCompactSize(collectionSize)
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -125,7 +125,7 @@ class KxsDataInputDecoder(
|
||||||
override fun decodeSequentially(): Boolean = true
|
override fun decodeSequentially(): Boolean = true
|
||||||
|
|
||||||
override fun decodeCollectionSize(descriptor: SerialDescriptor): Int =
|
override fun decodeCollectionSize(descriptor: SerialDescriptor): Int =
|
||||||
decodeInt().also { elementsCount = it }
|
decodeCompactSize().also { elementsCount = it }
|
||||||
|
|
||||||
override fun decodeNotNullMark(): Boolean = decodeBoolean()
|
override fun decodeNotNullMark(): Boolean = decodeBoolean()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue