Package org.apache.pekko.stream.scaladsl
Class Compression$
java.lang.Object
org.apache.pekko.stream.scaladsl.Compression$
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Compression$Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeflate()Creates a flow that deflate-compresses a stream of ByteString.deflate(int level, boolean nowrap) Same asdeflate()with configurable level and nowrapgzip()Creates a flow that gzip-compresses a stream of ByteStrings.gzip(int level) Same asgzip()with a custom level.gzipDecompress(int maxBytesPerChunk) Creates a Flow that decompresses a gzip-compressed stream of data.intinflate(int maxBytesPerChunk) Creates a Flow that decompresses a deflate-compressed stream of data.inflate(int maxBytesPerChunk, boolean nowrap) Creates a Flow that decompresses a deflate-compressed stream of data.intfinal int
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
Compression$
public Compression$()
-
-
Method Details
-
MaxBytesPerChunkDefault
public final int MaxBytesPerChunkDefault() -
gzip
Creates a flow that gzip-compresses a stream of ByteStrings. Note that the compressor will SYNC_FLUSH after everypekko.util.ByteStringso that it is guaranteed that everypekko.util.ByteStringcoming out of the flow can be fully decompressed without waiting for additional data. This may come at a compression performance cost for very small chunks.FIXME: should strategy / flush mode be configurable? See https://github.com/akka/akka/issues/21849
-
gzip
Same asgzip()with a custom level.- Parameters:
level- Compression level (0-9)
-
gzipDecompress
Creates a Flow that decompresses a gzip-compressed stream of data.- Parameters:
maxBytesPerChunk- Maximum length of an outputpekko.util.ByteStringchunk.- Since:
- 1.3.0
-
gzipDecompress$default$1
public int gzipDecompress$default$1() -
deflate
Creates a flow that deflate-compresses a stream of ByteString. Note that the compressor will SYNC_FLUSH after everypekko.util.ByteStringso that it is guaranteed that everypekko.util.ByteStringcoming out of the flow can be fully decompressed without waiting for additional data. This may come at a compression performance cost for very small chunks.FIXME: should strategy / flush mode be configurable? See https://github.com/akka/akka/issues/21849
-
deflate
Same asdeflate()with configurable level and nowrap- Parameters:
level- Compression level (0-9)nowrap- if true then use GZIP compatible compression
-
inflate
Creates a Flow that decompresses a deflate-compressed stream of data.- Parameters:
maxBytesPerChunk- Maximum length of an outputpekko.util.ByteStringchunk.
-
inflate
Creates a Flow that decompresses a deflate-compressed stream of data.- Parameters:
maxBytesPerChunk- Maximum length of an outputpekko.util.ByteStringchunk.nowrap- if true then use GZIP compatible decompression
-
inflate$default$1
public int inflate$default$1()
-