Thank you for your reply.

As you can see in my code the function I need returns a byte[], which is what I need, because I must also pass the sub buffer to methods that accept byte[], and there is where I must not have a copy of the buffer (if you think, for example, about creating a cast to byte[] method into your class, this would solve it, but a copy would be needed)