Ejemplo n.º 1
0
 static Source <ArraySegment <byte>, AkkaNet.NotUsed> GroupingGzipMapper(Source <ArraySegment <byte>, AkkaNet.NotUsed> s, LogsOutputGroupingConfig outputGroupingConfig) =>
 s.GroupedWithin(outputGroupingConfig.MaxFrames, outputGroupingConfig.MaxDuration)
 .Select(b => new ArraySegment <byte>(Compression.CompressToGzip(b.SelectMany(a => a).ToArray())));
Ejemplo n.º 2
0
 static Source <ArraySegment <byte>, NotUsed> GroupingGzipMapper(Source <ArraySegment <byte>, NotUsed> s, LogsOutputGroupingConfig outputGroupingConfig) =>
 s.GroupedWithin(outputGroupingConfig.MaxFrames, outputGroupingConfig.MaxDuration)
 .Select(
     b =>
 {
     var combinedArray = b.Select(a => a.Array).ToList().Combine();
     return(new ArraySegment <byte>(combinedArray));
 })
 .Select(m => new ArraySegment <byte>(Compression.CompressToGzip(m.Array)));