[solved] Problems passing QByteArray as a pointer

Hi everyone, I have quite a simple problem, but I cant find the solution for it, so ill try to explain it the best I can.
I need to create a function that would shift a whole QByteArray 1 bit, either to the left, or to the right. For example, if i had (0x00,0x80,0x44) and i shift it LEFT, i would like to have (0x01,0x00,0x88). The bits that are pushed "out" of the Array, are lost. And the new ones that i get, are set to 0.

I know this method isnt exactly "tidy" (specially the Left side, that instead of doing a reverse loop i changed i for jj), but it works, perfectly.
My problem is that, in my application, the QByteArray that needs to be shifted is extremely big, so, in order to save some time, id like to use a pointer, because otherwise, a copy needs to be done, and that takes a lot of time, that isnt necessary

none of them seem to work. I know that this is a basic concept, but ive ran out of ideas. I have a pointer to a QByteArray, and i would like to have the object itself. If i do something like

@
QByteArray NewArray=*vector;
@

and then work with NewArray, it works fine, but im copying vector, and thats what im trying to avoid. Any ideas please?

To sum up, i have a pointer to a QByteArray, and i would like to work it the same way I do if i have the object, (or at least be able to save bytes in it). I cant make a copy of it (the QByteArray is of 15Mb aprox).