Closed xxfast closed 3 months ago
File | Coverage [87.10%] | :white_check_mark: |
---|---|---|
kstore-file/src/commonMain/kotlin/io/github/xxfast/kstore/file/FileCodec.kt | 78.57% | :x: |
kstore-file/src/commonMain/kotlin/io/github/xxfast/kstore/file/KStore.kt | 76.92% | :x: |
kstore-file/src/commonMain/kotlin/io/github/xxfast/kstore/file/extensions/KListStore.kt | 83.33% | :white_check_mark: |
kstore-file/src/commonMain/kotlin/io/github/xxfast/kstore/file/extensions/KVersionedStore.kt | 96.55% | :white_check_mark: |
Total Project Coverage | 92.16% | :white_check_mark: |
---|
Hi @mani1232 & @8cAyqpVKio
I've added a new overloaded factory method that lets you provide a custom codec (if you want your custom file format) so this should theoretically let you use a format other than JSON)
Again, this is out of scope for now but should unblock anyone who wants to use other unstable serialiser formats
I have a couple questions: Does it make sense to save not immediately, but every X minutes? And will it be possible to set your own compression algorithm
Do you mean to schedule the writes to the disk?
KStore API for writes/reads all suspend
ed so that it will block whichever coroutine it is invoked from. This is by design.
There's couple advantages for this approach
However, any asynchronous behaviour can still be implemented on top of this - with coroutines.
Builds on top of @mani1232's #112