Login Page - Create Account

DTC Protocol Discussion Forum


Date/Time: Fri, 29 Nov 2024 16:31:40 +0000



Post From: Historical data zip format?

[2016-10-24 17:44:35]
DabbaDo - Posts: 148
From Sierra Chart server, I receive historical price data without problems when it is NOT zipped.
When zipped (i.e. the header shows UsingZLibCompression == 1), the next bytes coming across the wire are in what format? The first two bytes seem NOT to be compressed. Are they a batch size? And the next two bytes seem not to be a DTCMessageType, unless perhaps they are compressed.
In other words, is there some documentation/guidance about the bytes sent from the server following a HistoricalPriceDataResponseHeader message where UsingZLibCompression == 1?

Cheers,
Dale

P.S. I figured this out. I must skip past the 2-byte ZLib header (ref. https://tools.ietf.org/html/rfc1950) and then the DeflateStream class decompresses the records with no problems -- ref. https://msdn.microsoft.com/en-us/library/system.io.compression.deflatestream(v=vs.110).aspx [From version 4.5, .Net started using ZLib under the covers.]

[But it still might be worth a documentation one-liner, IMHO.]
Date Time Of Last Edit: 2016-10-25 09:16:09