SRS-control 0.1.4
Loading...
Searching...
No Matches
RawToDelimRawConveter.cpp
Go to the documentation of this file.
2#include <string_view>
3#include <vector>
4#include <zpp_bits.h>
5
6namespace srs::process
7{
8 void Raw2DelimRawConverter::convert(std::string_view input, std::vector<char>& output)
9 {
10 auto size = static_cast<SizeType>(input.size());
11 output.reserve(size + sizeof(size));
12 auto deserialize_to = zpp::bits::out{ output, zpp::bits::append{}, zpp::bits::endian::big{} };
13 deserialize_to(size, zpp::bits::unsized(input)).or_throw();
14 }
15
16} // namespace srs::process
static void convert(std::string_view input, std::vector< char > &output)