07/16/2022, 8:01 AM
How to keep efficiently continuous memory in RAM for Kotlin Multiplatform mobile project A mobile app receives series of 4 bytes long packets. There can be about ~1M of those packets received in one session. The app can analyse them once all packets are received, so there is a need to store them somehow. I wonder what is the best approach in terms of memory size efficiency for Kotlin Multiplatform Mobile project. I considered: Common implementation for Android and iOS and use: ByteArray List - keep 2 packets in the biggest primitive - Long (8B) to reduce number of internal items...