RFoe / coasync

Asynchronous network library that supports coroutines in C++20
https://github.com/RFoe/coasync
MIT License
18 stars 3 forks source link

对大整数使用varint/zigzag压缩编码 #6

Closed RFoe closed 6 days ago

RFoe commented 4 weeks ago

https://github.com/RFoe/coasync/blob/a466688370ce4bc5feefc8a55d960de447dfbfde/include/coasync/detail/meta/serde_stream_base.hpp#L159-L160

或许是这样

template <typename T> 
awaitable<void> COASYNC_API serialize(T const& value) 
requires std::integral<T> and sizeof(T) > bigint_size 
{...};