I
inftoconc
Hi all,
I wrote a macro to read 8 bytes from a byte stream. Am not
sure if it is working ok. Can anyone please point out if there looks
to be a problem!
#define READ64(b) ( (uint64_t(*b)) << 56) + ((uint64_t(*(b+1))) << 48)
+ ((uint64_t(*(b+2))) << 40) +((uint64_t(*(b+3))) << 32)+((uint64_t(*(b
+4))) << 24) + (( uint64_t(*(b+5))) << 16) + (( uint64_t(*(b+6))) <<
8) + ( *(b+7))
Here b is a pointer to an unsigned char.
Thanks,
Vishal
I wrote a macro to read 8 bytes from a byte stream. Am not
sure if it is working ok. Can anyone please point out if there looks
to be a problem!
#define READ64(b) ( (uint64_t(*b)) << 56) + ((uint64_t(*(b+1))) << 48)
+ ((uint64_t(*(b+2))) << 40) +((uint64_t(*(b+3))) << 32)+((uint64_t(*(b
+4))) << 24) + (( uint64_t(*(b+5))) << 16) + (( uint64_t(*(b+6))) <<
8) + ( *(b+7))
Here b is a pointer to an unsigned char.
Thanks,
Vishal