Skip to content

Commit 4f3a516

Browse files
authored
VER: Release 0.55.0
2 parents ba9ba3f + 2e25903 commit 4f3a516

22 files changed

Lines changed: 194 additions & 62 deletions

.clang-tidy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Checks: >
33
-*,
44
bugprone-*,
55
-bugprone-easily-swappable-parameters,
6+
-bugprone-invalid-enum-default-initialization,
67
clang-analyzer-*,
78
-clang-analyzer-optin.cplusplus.VirtualCall,
89
clang-diagnostic-*,

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## 0.55.0 - 2026-04-28
4+
5+
### Enhancements
6+
- Improved `DbnDecoder` throughput on current-version data and `AsIs` workloads by
7+
caching whether the upgrade policy-version combination requires upgrading, skipping
8+
the per-record `DecodeRecordCompat` dispatch on the fast path
9+
- Made `detail::Buffer` shifts explicit to avoid redundant moves during record decoding
10+
- Added new publisher values for Cboe Titanium Cboe Global Indices Feed
11+
- Added `Year` to `SplitDuration` enum for yearly historical batch job submissions
12+
- Upgraded default cpp-httplib version to 0.43.1
13+
- Upgraded default nlohmann/json version to 3.12.0
14+
315
## 0.54.0 - 2026-04-21
416

517
### Enhancements

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.24..4.2)
66

77
project(
88
databento
9-
VERSION 0.54.0
9+
VERSION 0.55.0
1010
LANGUAGES CXX
1111
DESCRIPTION "Official Databento client library"
1212
)
@@ -152,7 +152,7 @@ if(${PROJECT_NAME_UPPERCASE}_USE_EXTERNAL_JSON)
152152
find_package(nlohmann_json REQUIRED)
153153
endif()
154154
else()
155-
set(json_version 3.11.3)
155+
set(json_version 3.12.0)
156156
# Required to correctly install nlohmann_json
157157
set(JSON_Install ON)
158158
FetchContent_Declare(
@@ -178,7 +178,7 @@ if(${PROJECT_NAME_UPPERCASE}_USE_EXTERNAL_HTTPLIB)
178178
find_package(httplib REQUIRED)
179179
endif()
180180
else()
181-
set(httplib_version 0.37.2)
181+
set(httplib_version 0.43.1)
182182
FetchContent_Declare(
183183
httplib
184184
URL https://github.com/yhirose/cpp-httplib/archive/refs/tags/v${httplib_version}.tar.gz

include/databento/dbn_decoder.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ class DbnDecoder {
3535
VersionUpgradePolicy upgrade_policy, bool ts_out,
3636
std::array<std::byte, kMaxRecordLen>* compat_buffer,
3737
Record rec);
38+
// Returns whether a record from `version`-formatted data requires runtime
39+
// upgrade dispatch under `upgrade_policy`.
40+
static bool NeedsUpgrade(VersionUpgradePolicy upgrade_policy, std::uint8_t version);
3841

3942
// Should be called exactly once.
4043
Metadata DecodeMetadata();
@@ -61,6 +64,7 @@ class DbnDecoder {
6164
ILogReceiver* log_receiver_;
6265
std::uint8_t version_{};
6366
VersionUpgradePolicy upgrade_policy_;
67+
bool needs_upgrade_{true};
6468
bool ts_out_{};
6569
std::unique_ptr<IReadable> input_;
6670
detail::Buffer buffer_{};

include/databento/detail/buffer.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,7 @@ class Buffer : public IReadable, public IWritable {
4646
std::byte* ReadEnd() { return write_pos_; }
4747
const std::byte* ReadBegin() const { return read_pos_; }
4848
const std::byte* ReadEnd() const { return write_pos_; }
49-
// Indicate how many bytes were read
50-
void Consume(std::size_t length) {
51-
read_pos_ += length;
52-
if (static_cast<std::size_t>(read_pos_ - buf_.get()) > (Capacity() / 2)) {
53-
Shift();
54-
}
55-
}
56-
void ConsumeNoShift(std::size_t length) { read_pos_ += length; }
49+
void Consume(std::size_t length) { read_pos_ += length; }
5750
std::size_t ReadCapacity() const {
5851
return static_cast<std::size_t>(write_pos_ - read_pos_);
5952
}
@@ -65,6 +58,13 @@ class Buffer : public IReadable, public IWritable {
6558
}
6659
void Reserve(std::size_t capacity);
6760
void Shift();
61+
// Shifts unread data to offset 0 if writable space is less than `needed`,
62+
// reclaiming the consumed prefix. Does not grow the buffer.
63+
void ShiftForSpace(std::size_t needed) {
64+
if (WriteCapacity() < needed && read_pos_ != buf_.get()) {
65+
Shift();
66+
}
67+
}
6868

6969
friend std::ostream& operator<<(std::ostream& stream, const Buffer& buffer);
7070

include/databento/detail/dbn_buffer_decoder.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class DbnBufferDecoder {
6161
alignas(RecordHeader) std::array<std::byte, kMaxRecordLen> compat_buffer_{};
6262
std::uint8_t input_version_{};
6363
bool ts_out_{};
64+
bool needs_upgrade_{true};
6465
DecoderState state_{DecoderState::Init};
6566
};
6667
} // namespace databento::detail

include/databento/detail/http_client.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class HttpClient {
4343
httplib::Result&& res) const;
4444
void CheckWarnings(const httplib::Response& response) const;
4545

46-
static const httplib::Headers kHeaders;
46+
static const httplib::Headers& BaseHeaders();
4747

4848
ILogReceiver* log_receiver_;
4949
httplib::Client client_;

include/databento/enums.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ enum class SplitDuration : std::uint8_t {
2424
Day = 0,
2525
Week,
2626
Month,
27+
Year,
2728
None,
2829
};
2930

include/databento/publishers.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ enum class Venue : std::uint16_t {
117117
Mxto = 54,
118118
// IEX Options LLC
119119
Iexo = 55,
120+
// Cboe Global Indices Feed
121+
Cgif = 56,
120122
};
121123

122124
// A source of data.
@@ -203,6 +205,8 @@ enum class Dataset : std::uint16_t {
203205
XcbfPitch = 40,
204206
// Blue Ocean ATS MEMOIR Depth
205207
OceaMemoir = 41,
208+
// Cboe Titanium Cboe Global Indices Feed
209+
CgifTitanium = 42,
206210
};
207211

208212
// A specific Venue from a specific data source.
@@ -425,6 +429,8 @@ enum class Publisher : std::uint16_t {
425429
OpraPillarMxto = 108,
426430
// OPRA - IEX Options LLC
427431
OpraPillarIexo = 109,
432+
// Cboe Global Indices Feed
433+
CgifTitaniumCgif = 110,
428434
};
429435

430436
// Get a Publisher's Venue.

include/databento/symbology.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#include <ostream>
44
#include <string>
5+
#include <string_view>
56
#include <unordered_map>
67
#include <vector>
78

@@ -28,10 +29,10 @@ struct SymbologyResolution {
2829
//
2930
// Throws InvalidArgumentError if symbols is empty or the iterator range is
3031
// empty.
31-
std::string JoinSymbolStrings(const std::string& method_name,
32+
std::string JoinSymbolStrings(std::string_view method_name,
3233
std::vector<std::string>::const_iterator symbols_begin,
3334
std::vector<std::string>::const_iterator symbols_end);
34-
std::string JoinSymbolStrings(const std::string& method_name,
35+
std::string JoinSymbolStrings(std::string_view method_name,
3536
const std::vector<std::string>& symbols);
3637
std::string ToString(const SymbologyResolution& sym_res);
3738
std::ostream& operator<<(std::ostream& stream, const SymbologyResolution& sym_res);

0 commit comments

Comments
 (0)