BitArray
Support targets
- jvm
- Linux x64
- Linux Arm32Hfp
- Linux Arm64
- Linux Mips32
- Linux Mipsel32
- Mingw x64
- Mingw x86
- Android Native Arm32
- Android Native Arm64
- Android Native x86
- Android Native x64
- Macos x64
- Macos Arm64
- IOS
- IOS Arm32
- IOS Arm64
- IOS Simulator Arm64
- WatchOS
- WatchOS Arm32
- WatchOS Arm64
- WatchOS Simulator Arm64
- WatchOS x64
- WatchOS x86
- Wasm32
- JS (Legacy and IR)
Description
BitArray for Kotlin Common Library contains:
All classes implements BitArray. All classes is inline
classes.
BitArray32
based in Int
, BitArray64
based on Long
and BytesBitArray
based on ByteArray
Examples
BitArray32/BitArray64
var array = BitArray32()// or BitArray64
array = array.update(index = 1, value = true)
println("value is ${array[1]}")
BytesBitArray
val array = BytesBitArray(6) //or BytesBitArray(ByteArray(6))
array[1] = true// was modified current value without reassign `array` variable
println("value is ${array[1]}")
val array2 = array.update(index = 1, value = false)// creates new array
println("value is ${array2[1]}")