66#include < string>
77
88#include " databento/dbn.hpp"
9- #include " databento/detail/shared_channel.hpp"
109#include " databento/enums.hpp" // Upgrade Policy
1110#include " databento/file_stream.hpp"
1211#include " databento/ireadable.hpp"
@@ -18,7 +17,6 @@ namespace databento {
1817// handled. Defaults to upgrading DBNv1 data to version 2 (the current version).
1918class DbnDecoder {
2019 public:
21- DbnDecoder (ILogReceiver* log_receiver, detail::SharedChannel channel);
2220 DbnDecoder (ILogReceiver* log_receiver, InFileStream file_stream);
2321 DbnDecoder (ILogReceiver* log_receiver, std::unique_ptr<IReadable> input);
2422 DbnDecoder (ILogReceiver* log_receiver, std::unique_ptr<IReadable> input,
@@ -27,7 +25,8 @@ class DbnDecoder {
2725 static std::pair<std::uint8_t , std::size_t > DecodeMetadataVersionAndSize (
2826 const std::byte* buffer, std::size_t size);
2927 static Metadata DecodeMetadataFields (std::uint8_t version,
30- const std::vector<std::byte>& buffer);
28+ const std::byte* buffer,
29+ const std::byte* buffer_end);
3130 // Decodes a record possibly applying upgrading the data according to the
3231 // given version and upgrade policy. If an upgrade is applied,
3332 // compat_buffer is modified.
@@ -42,21 +41,17 @@ class DbnDecoder {
4241 const Record* DecodeRecord ();
4342
4443 private:
45- static std::string DecodeSymbol (
46- std::size_t symbol_cstr_len,
47- std::vector<std::byte>::const_iterator& buffer_it);
44+ static std::string DecodeSymbol (std::size_t symbol_cstr_len,
45+ const std::byte*& buffer);
4846 static std::vector<std::string> DecodeRepeatedSymbol (
49- std::size_t symbol_cstr_len,
50- std::vector<std::byte>::const_iterator& buffer_it,
51- std::vector<std::byte>::const_iterator buffer_end_it);
47+ std::size_t symbol_cstr_len, const std::byte*& buffer,
48+ const std::byte* buffer_end);
5249 static std::vector<SymbolMapping> DecodeSymbolMappings (
53- std::size_t symbol_cstr_len,
54- std::vector<std::byte>::const_iterator& buffer_it,
55- std::vector<std::byte>::const_iterator buffer_end_it);
56- static SymbolMapping DecodeSymbolMapping (
57- std::size_t symbol_cstr_len,
58- std::vector<std::byte>::const_iterator& buffer_it,
59- std::vector<std::byte>::const_iterator buffer_end_it);
50+ std::size_t symbol_cstr_len, const std::byte*& buffer,
51+ const std::byte* buffer_end);
52+ static SymbolMapping DecodeSymbolMapping (std::size_t symbol_cstr_len,
53+ const std::byte*& buffer,
54+ const std::byte* buffer_end);
6055 bool DetectCompression ();
6156 std::size_t FillBuffer ();
6257 std::size_t GetReadBufferSize () const ;
0 commit comments