However, being a little unsure about the "optimal" usage of IO classes and functions in Python, I got a little speed problem. The code run in Python isruns 10 times slower thanin Python compared to the C# equivalent, and I don't find any more optimization potential, because of my limited Python knowledge.
I hope this question is not too broad and requiresdoesn't require too much work... some general optimization tips when using BytesIOBytesIO
(or using a class suiting this case better?) would be great already!