Many moons ago, when I wrote my first Kotlin project and Kotlin was still in the "good to use, but not the go to approved language for android", I built a little
Copy code
class UByteReadStream(internal val buffer: UByteArray)
It basically allows me to "next" through a ubytearray, check at end, decode varint sections, etc. Since then the, the Kotlin libraries have grown quite a bit. Is there a more built in/stock idiomatic thing to use to consume/take from an in memory ubytearray?