shift array of bytes

I

itzik peretz

i have an array of bytes from variable length and i need to shift it
in variable size of bits between 1-7. do someone know about
constructive way to do it? beside iterate the array and deal with each
byte or word each time .
thanks
 
H

Howard

itzik peretz said:
i have an array of bytes from variable length and i need to shift it
in variable size of bits between 1-7. do someone know about
constructive way to do it? beside iterate the array and deal with each
byte or word each time .
thanks

You'll have to iterate, sorry. There may be some machine-code instructions
on certain processors that let you do bit-shifts across a span of memory,
but that's assembler, and platform-specific, not something you can do in
standard C++.

-Howard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top