For a given Array[Byte] such as
val in = Array(104, 101, 108, 108, 111, 10, 119, 111, 114, 108, 100, 10)
how to split it by value 10 so that
val out = in.arr_split(10)
would deliver
Array( Array(104, 101, 108, 108, 111),
Array(119, 111, 114, 108, 100))
Assume in general many occurrences of splitting elements, for instance many 10.
If possible, a parallel solution is desired.
Many Thanks.