diff --git a/akka-docs/src/main/paradox/stream/operators/Compression/gunzip.md b/akka-docs/src/main/paradox/stream/operators/Compression/gunzip.md new file mode 100644 index 0000000000..2a68e63440 --- /dev/null +++ b/akka-docs/src/main/paradox/stream/operators/Compression/gunzip.md @@ -0,0 +1,26 @@ +# Compression.gunzip + +Creates a flow that gzip-decompresses a stream of ByteStrings. + +@ref[Compression operators](../index.md#compression-operators) + +## Signature + +@apidoc[Compression.gunzip](stream.*.Compression$) { scala="#gunzip(maxBytesPerChunk:Int):akka.stream.scaladsl.Flow[akka.util.ByteString,akka.util.ByteString,akka.NotUsed]" java="#gunzip(int)" } + +## Description + +Creates a flow that gzip-decompresses a stream of ByteStrings. If the input is truncated, uses invalid +compression method or is invalid (failed CRC checks) this operator fails with a `java.util.zip.ZipException`. + +## Reactive Streams semantics + +@@@div { .callout } + +**emits** when the decompression algorithm produces output for the received `ByteString` (the emitted `ByteString` is of `maxBytesPerChunk` maximum length) + +**backpressures** when downstream backpressures + +**completes** when upstream completes + +@@@ diff --git a/akka-docs/src/main/paradox/stream/operators/Compression/inflate.md b/akka-docs/src/main/paradox/stream/operators/Compression/inflate.md new file mode 100644 index 0000000000..b1360d9c53 --- /dev/null +++ b/akka-docs/src/main/paradox/stream/operators/Compression/inflate.md @@ -0,0 +1,25 @@ +# Compression.inflate + +Creates a flow that deflate-decompresses a stream of ByteStrings. + +@ref[Compression operators](../index.md#compression-operators) + +## Signature + +@apidoc[Compression.indeflate](stream.*.Compression$) { scala="#inflate(maxBytesPerChunk:Int,nowrap:Boolean):akka.stream.scaladsl.Flow[akka.util.ByteString,akka.util.ByteString,akka.NotUsed]" java="#inflate(int,boolean)" } + +## Description + +Creates a flow that deflate-decompresses a stream of ByteStrings. + +## Reactive Streams semantics + +@@@div { .callout } + +**emits** when the compression algorithm produces output for the received `ByteString` (the emitted `ByteString` is of `maxBytesPerChunk` maximum length) + +**backpressures** when downstream backpressures + +**completes** when upstream completes (may emit finishing bytes in an extra `ByteString` ) + +@@@ diff --git a/akka-docs/src/main/paradox/stream/operators/index.md b/akka-docs/src/main/paradox/stream/operators/index.md index 649b321b9d..48fa47bae3 100644 --- a/akka-docs/src/main/paradox/stream/operators/index.md +++ b/akka-docs/src/main/paradox/stream/operators/index.md @@ -333,7 +333,9 @@ Flow operators to (de)compress. | |Operator|Description| |--|--|--| |Compression|@ref[deflate](Compression/deflate.md)|Creates a flow that deflate-compresses a stream of ByteStrings. | +|Compression|@ref[gunzip](Compression/gunzip.md)|Creates a flow that gzip-decompresses a stream of ByteStrings. | |Compression|@ref[gzip](Compression/gzip.md)|Creates a flow that gzip-compresses a stream of ByteStrings. | +|Compression|@ref[inflate](Compression/inflate.md)|Creates a flow that deflate-decompresses a stream of ByteStrings. | ## Error handling @@ -439,11 +441,13 @@ For more background see the @ref[Error Handling in Streams](../stream-error.md) * [grouped](Source-or-Flow/grouped.md) * [groupedWeightedWithin](Source-or-Flow/groupedWeightedWithin.md) * [groupedWithin](Source-or-Flow/groupedWithin.md) +* [gunzip](Compression/gunzip.md) * [gzip](Compression/gzip.md) * [head](Sink/head.md) * [headOption](Sink/headOption.md) * [idleTimeout](Source-or-Flow/idleTimeout.md) * [ignore](Sink/ignore.md) +* [inflate](Compression/inflate.md) * [initialDelay](Source-or-Flow/initialDelay.md) * [initialTimeout](Source-or-Flow/initialTimeout.md) * [interleave](Source-or-Flow/interleave.md) diff --git a/project/StreamOperatorsIndexGenerator.scala b/project/StreamOperatorsIndexGenerator.scala index 380d20c525..b84d72f2fe 100644 --- a/project/StreamOperatorsIndexGenerator.scala +++ b/project/StreamOperatorsIndexGenerator.scala @@ -97,8 +97,7 @@ object StreamOperatorsIndexGenerator extends AutoPlugin { "fromGraph", "actorSubscriber", "foldAsync", - "newOnCompleteStage"), - "Compression" -> Seq("inflate", "gunzip")) + "newOnCompleteStage")) val ignore = Set("equals", "hashCode", "notify", "notifyAll", "wait", "toString", "getClass") ++