DTC Protocol Discussion Forum
- DTC Protocol Discussion Forum |
- Search Board |
- Control Panel |
- View My Posts / Threads |
- Direct Messages
Date/Time: Thu, 24 Sep 2020 02:19:30 +0000
Post From: Historical data zip format?
|AndrewAMD1 - Posts: 27 | Ending Date: 2020-09-25|
I have a question about zlib with DTC. (Long term, I might implement this if I run into bandwidth problems.)
So with uncompressed messages, I can always read the type and size up front and size my buffers accordingly. (This is using C++17 & Boost Asio.) But I think it is not this simple when using zlib.
Okay, so I request historical data and get an uncompressed header. But then the rest of the messages are in compressed zlib? I need a feasible way to allocate buffers and decode without ruining the decompression process.
1) In general, how should I approach receiving zlib data from the historical server?
2) How am I supposed to know when I received all messages for a particular request if the "last message" flag is already encoded?