Yeah I figured that GoLang’s HTTP Library natively supports GZip compression
(using example at https://github.com/influxdata/influxdb-java/pull/241)
I think it would still be worth mentioning in the documentation,
as not many people are familiar with Go HTTP features,
and other wise there is an impression that InfluxDB doesn’t support compression.
.NET Standard Library supports compression as well and this works amazingly!
If somebody is interested, here is code snipet:
using (var request = new HttpRequestMessage(HttpMethod.Post, _uploadAddress))
byte bytes = Encoding.UTF8.GetBytes(sb.ToString());
using (var memoryStream = new MemoryStream())
// Compressing bytes into MemoryStream's buffer.
using (var gZipStream = new GZipStream(memoryStream, _config.CompressionLevel, true))
gZipStream.Write(bytes, 0, bytes.Length);
memoryStream.Position = 0;
using (request.Content = new StreamContent(memoryStream))
request.Content.Headers.ContentLength = memoryStream.Length;
using (HttpResponseMessage response = await _client.SendAsync(request, _token))