mdedetrich commented on code in PR #2409:
URL: https://github.com/apache/pekko/pull/2409#discussion_r2576975777
##########
docs/src/main/paradox/stream/operators/Compression/zstd.md:
##########
@@ -0,0 +1,30 @@
+# Compression.zstd
+
+Creates a flow that zstd-compresses a stream of ByteStrings.
+
+@ref[Compression operators](../index.md#compression-operators)
+
+## Signature
+
+@apidoc[Compression.zstd](stream.*.Compression$) {
scala="#zstd:org.apache.pekko.stream.scaladsl.Flow[org.apache.pekko.util.ByteString,org.apache.pekko.util.ByteString,org.apache.pekko.NotUsed]"
java="#zstd()" }
+
+## Description
+
+Creates a flow that zstd-compresses a stream of ByteStrings. Note that the
compressor
+will SYNC_FLUSH after every @apidoc[util.ByteString] so that it is guaranteed
that every @apidoc[util.ByteString]
Review Comment:
> But that is not the case "if the way the incoming data is cut up into
ByteStrings is not deterministic", right? E.g when the data is coming from the
network?
Yes true, I believe that comment is strictly talking about the source
happens right before going into compression and not the entire "stack". All the
comment is trying to convey is that if `autoFlush` is true, any buffers will
get processed and cleared for each incoming element, so if you have "abc" as an
incoming element, you will always get the compressed "abc" as a result, and not
lets say "a" and then "bc" as a further element or some variation.
The network can always split up data as it wants, but thats an orthogonal
concern
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]