Fastest Method to Split a 32 Bit number into Bytes in C++

后端 未结 7 1201
梦谈多话
梦谈多话 2021-01-21 03:15

I am writing a piece of code designed to do some data compression on CLSID structures. I\'m storing them as a compressed stream of 128 bit integers. However, the code in questio

相关标签:
7条回答
  • 2021-01-21 04:00

    Do you have to do it one byte at a time? Is there a way you could just memcpy() the whole 32 bits into the stream in one fell swoop? If you have the address of the buffer you're writing to the stream, can you just copy into that?

    0 讨论(0)
提交回复
热议问题