func putBytes(log logger.T, byteArray []byte, offsetStart int, offsetEnd int, inputBytes []byte) (err error) {
	byteArrayLength := len(byteArray)
	if offsetStart > byteArrayLength-1 || offsetEnd > byteArrayLength-1 || offsetStart > offsetEnd || offsetStart < 0 {
		log.Error("putBytes failed: Offset is invalid.")
		return errors.New("Offset is outside the byte array.")
	}

	if offsetEnd-offsetStart+1 != len(inputBytes) {
		log.Error("putBytes failed: Not enough space to save the bytes.")
		return errors.New("Not enough space to save the bytes.")
	}

	copy(byteArray[offsetStart:offsetEnd+1], inputBytes)
	return nil
}
// putBytes puts bytes into the array at the correct offset.
putBytes puts bytes into the array at the correct offset.
// putBytes puts bytes into the array at the correct offset .
func putBytes(log logger.T, byteArray []byte, offsetStart int, offsetEnd int, inputBytes []byte) (err error) {
	byteArrayLength := len(byteArray)
	if offsetStart > byteArrayLength-1 || offsetEnd > byteArrayLength-1 || offsetStart > offsetEnd || offsetStart < 0 {
		log.Error("putBytes failed: Offset is invalid.")
		return errors.New("Offset is outside the byte array.")
	}
	if offsetEnd-offsetStart+1 != len(inputBytes) {
		log.Error("putBytes failed: Not enough space to save the bytes.")
		return errors.New("Not enough space to save the bytes.")
	}
	copy(byteArray[offsetStart:offsetEnd+1], inputBytes)
	return nil
}
func putBytes ( log logger . T , byteArray [ ] byte , offsetStart int , offsetEnd int , inputBytes [ ] byte ) ( err error ) { byteArrayLength := len ( byteArray ) if offsetStart > byteArrayLength - 1 || offsetEnd > byteArrayLength - 1 || offsetStart > offsetEnd || offsetStart < 0 { log . Error ( " " ) return errors . New ( " " ) } if offsetEnd - offsetStart + 1 != len ( inputBytes ) { log . Error ( " " ) return errors . New ( " " ) } copy ( byteArray [ offsetStart : offsetEnd + 1 ] , inputBytes ) return nil }
putBytes puts bytes into the array at the correct offset.
putBytes puts bytes into the array at the correct offset .