BlobRecordSerializer

A serializer that serializes/deserializes a Record to a ByteArray

It's a very basic implementation that encodes a record like below

number of entries - Int

------

name of the entry0 - String timestamp of entry0 - Long? value of entry0 - Any?

name of the entry1 - String timestamp of entry1 - Long? value of entry1 - Any?

etc...

For each value, the type of the value is encoded using a single identifier byte so that deserialization can deserialize to the expected type

This should be revisited/optimized

Functions

Link copied to clipboard
fun deserialize(key: String, bytes: ByteArray): Record

returns the Record for the given Json

Link copied to clipboard
fun serialize(record: Record): ByteArray