Adds skeleton pages for gunzip and inflate. (#29214)

This commit is contained in:
Ignasi Marimon-Clos 2020-06-10 09:51:11 +02:00 committed by GitHub
parent 7e69b990b9
commit 0c88b4ba10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 56 additions and 2 deletions

View file

@ -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
@@@

View file

@ -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` )
@@@

View file

@ -333,7 +333,9 @@ Flow operators to (de)compress.
| |Operator|Description|
|--|--|--|
|Compression|<a name="deflate"></a>@ref[deflate](Compression/deflate.md)|Creates a flow that deflate-compresses a stream of ByteStrings. |
|Compression|<a name="gunzip"></a>@ref[gunzip](Compression/gunzip.md)|Creates a flow that gzip-decompresses a stream of ByteStrings. |
|Compression|<a name="gzip"></a>@ref[gzip](Compression/gzip.md)|Creates a flow that gzip-compresses a stream of ByteStrings. |
|Compression|<a name="inflate"></a>@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)

View file

@ -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") ++