support overload for arraysegment<byte> and enumerable of

tests pass on linux have not tried windows