package com.infendro.bytes.bytearray import com.infendro.bytes.byte.not import kotlin.experimental.and import kotlin.experimental.or import kotlin.experimental.xor fun ByteArray.andInto( that: ByteArray, destination: ByteArray, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size, thatStartIndex: Int = 0, ) { val length = endIndex - startIndex require(length >= 0) require(startIndex in 0..(size - length)) require(thatStartIndex in 0..(that.size - length)) require(destinationOffset in 0..(destination.size - length)) for (i in 0..= 0) require(startIndex in 0..(size - length)) require(destinationOffset in 0..(destination.size - length)) for (i in 0..= 0) require(startIndex in 0..(size - length)) require(thatStartIndex in 0..(that.size - length)) require(destinationOffset in 0..(destination.size - length)) for (i in 0..= 0) require(startIndex in 0..(size - length)) require(destinationOffset in 0..(destination.size - length)) for (i in 0..= 0) require(startIndex in 0..(size - length)) require(thatStartIndex in 0..(that.size - length)) require(destinationOffset in 0..(destination.size - length)) for (i in 0..= 0) require(startIndex in 0..(size - length)) require(destinationOffset in 0..(destination.size - length)) for (i in 0..= 0) require(startIndex in 0..(size - length)) require(destinationOffset in 0..(destination.size - length)) for (i in 0..