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())));
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)));