CPPPROGLIB Telegram 6162
🍩 Фича: std::byteswap

Конвертация между little/big endian теперь можно производить за один вызов функции.


До:
uint32_t swap(uint32_t x) {
return ((x >> 24) & 0xff) | ((x << 8) & 0xff0000) |
((x >> 8) & 0xff00) | ((x << 24) & 0xff000000);
}


После:
uint32_t swapped = std::byteswap(value);



✏️ Практика:

• Сетевые протоколы
• Чтение бинарных файлов
• Кросс-платформенная сериализация

Библиотека C/C++ разработчика

#буст
Please open Telegram to view this post
VIEW IN TELEGRAM
👍53



tgoop.com/cppproglib/6162
Create:
Last Update:

🍩 Фича: std::byteswap

Конвертация между little/big endian теперь можно производить за один вызов функции.


До:

uint32_t swap(uint32_t x) {
return ((x >> 24) & 0xff) | ((x << 8) & 0xff0000) |
((x >> 8) & 0xff00) | ((x << 24) & 0xff000000);
}


После:
uint32_t swapped = std::byteswap(value);



✏️ Практика:

• Сетевые протоколы
• Чтение бинарных файлов
• Кросс-платформенная сериализация

Библиотека C/C++ разработчика

#буст

BY Библиотека C/C++ разработчика | cpp, boost, qt


Share with your friend now:
tgoop.com/cppproglib/6162

View MORE
Open in Telegram


Telegram News

Date: |

"Doxxing content is forbidden on Telegram and our moderators routinely remove such content from around the world," said a spokesman for the messaging app, Remi Vaughn. Among the requests, the Brazilian electoral Court wanted to know if they could obtain data on the origins of malicious content posted on the platform. According to the TSE, this would enable the authorities to track false content and identify the user responsible for publishing it in the first place. Some Telegram Channels content management tips Users are more open to new information on workdays rather than weekends. According to media reports, the privacy watchdog was considering “blacklisting” some online platforms that have repeatedly posted doxxing information, with sources saying most messages were shared on Telegram.
from us


Telegram Библиотека C/C++ разработчика | cpp, boost, qt
FROM American