Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > shift array of bytes

Reply
Thread Tools

shift array of bytes

 
 
itzik peretz
Guest
Posts: n/a
 
      11-18-2003
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
 
Reply With Quote
 
 
 
 
Howard
Guest
Posts: n/a
 
      11-18-2003

"itzik peretz" <> wrote in message
news: om...
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Left Shift / Right Shift Operators Santosh Nayak C Programming 16 11-30-2006 05:10 PM
Could a struct with size 44 bytes point always points to a char array with size 2024 bytes? eagle_jyjh@citiz.net C++ 8 04-10-2006 03:05 PM
Could a struct with size 44 bytes point always points to a char array with size 2048 bytes? eagle_jyjh@citiz.net C Programming 5 04-09-2006 02:49 PM
Shift - byte[] buf shift Roberto Gallo Java 3 01-27-2004 04:26 PM
left shift then right shift an unsigned int Wenjie C++ 3 07-11-2003 08:22 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57