Repository navigation
releases/cpp/v2.2.0
·
8 commits
to main
since this release
New features
ReadMessageOptionsgains chainedstartingAt(),startingAfter(),endingAt(), andendingBefore()setters withstart()/end()accessors. ThestartTime/endTimemembers, the positional constructor, and the positionalreadMessages(start, end)overloads are[[deprecated]]. NewreadMessages()andreadMessages(const ReadMessageOptions&)overloads need no callback. (#1805, #1877)LinearMessageView::status()reports why a read failed, includingNotOpenfor a reader that was never opened. (#1865)
Behavior changes
- Default
Header.librarystring is nowmcap-cpp/X.Y.Zinstead oflibmcap X.Y.Z, matching the other SDKs. (#1702) - Default zstd level is 3 instead of 1, and
chunkSizeis now a threshold rather than a hard cap, matching the other writers. Chunk boundaries now match Rust, Go, and Python output. (#1804) - Default LZ4 compression is fast mode instead of LZ4HC level 9.
CompressionLevel::SlowandSloweststill use LZ4HC. (#1807) DefaultChunkSizeis 1 MiB instead of 768 KiB. (#1659)FileWriterthrowsstd::system_erroron a short write instead of asserting, preserving the OS error code. (#1798)- A read range whose end precedes its start reports
InvalidMessageReadOptionsinstead of returning an empty view. (#1805) - Chunks whose decompressed size does not match the declared uncompressed size are rejected. (#1824)
- Build: Conan 2 is required, and the lz4 Conan requirement is 1.10.0. (#1706, #1872)
Bug fixes
- Fix a GCC
-Warray-boundsfalse positive in the CRC32 code. (#1610)
Performance
- Hardware-accelerated CRC32 (PCLMUL on x86_64, CRC instructions on aarch64), detected at build and run time, with CRC batched per chunk. Writes are 18% to 41% faster. (#1829)
- The message record header is written in one call instead of six, 13% to 22% faster writes. (#1879)
BufferWriterreserveschunkSizein its constructor. (#1643)