Zserio C++17 runtime library 1.3.0
Built for Zserio 2.20.0
Loading...
Searching...
No Matches
FileUtil.h
Go to the documentation of this file.
1
10#ifndef ZSERIO_FILE_UTIL_H_INC
11#define ZSERIO_FILE_UTIL_H_INC
12
13#include <string_view>
14
15#include "zserio/BitBuffer.h"
16
17namespace zserio
18{
19
29BitBuffer readBufferFromFile(std::string_view fileName);
30
40void writeBufferToFile(const uint8_t* buffer, size_t bitSize, BitsTag, std::string_view fileName);
41
53inline void writeBufferToFile(const uint8_t* buffer, size_t byteSize, std::string_view fileName)
54{
56}
57
68template <typename ALLOC>
69inline void writeBufferToFile(const BasicBitBuffer<ALLOC>& bitBuffer, std::string_view fileName)
70{
71 writeBufferToFile(bitBuffer.getBuffer(), bitBuffer.getBitSize(), BitsTag(), fileName);
72}
73
74} // namespace zserio
75
76#endif // ZSERIO_FILE_UTIL_H_INC
BasicBitBuffer<> BitBuffer
Definition BitBuffer.h:489
void writeBufferToFile(const uint8_t *buffer, size_t bitSize, BitsTag, std::string_view fileName)
Definition FileUtil.cpp:10
BitBuffer readBufferFromFile(std::string_view fileName)
Definition FileUtil.cpp:25