package net.sergeych.lynon /** * Bit size-aware code, short [BitList] implementation, up to 64 bits (efficiency tradeoff). * E.g `Bits(0, 3) != Bits(0, 2). For longer, use [BitArray]. * * Note that [bitListOf] creates [TinyBits] when possible. */ class TinyBits(initValue: ULong = 0U, override val size: Long = 0): BitList { private var bits: ULong = initValue constructor(value: ULong, size: Int): this(value, size.toLong()) {} override val indices: LongRange by lazy { 0.. this[i.toLong()] = v } } } } }