Package org.apache.pekko.stream.javadsl
Class Compression$
java.lang.Object
org.apache.pekko.stream.javadsl.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 nowrapdeflate(int level, boolean nowrap, boolean autoFlush) Same asdeflate()with configurable level, nowrap and autoFlush.gzip()Creates a flow that gzip-compresses a stream of ByteStrings.gzip(int level) Same asgzip()with a custom level.gzip(int level, boolean autoFlush) Same asgzip()with a custom level and configurable flush mode.gzipDecompress(int maxBytesPerChunk) Creates a Flow that decompresses gzip-compressed stream of data.inflate(int maxBytesPerChunk) Creates a Flow that decompresses deflate-compressed stream of data.inflate(int maxBytesPerChunk, boolean nowrap) Same asinflate(int)with configurable maximum output length and nowrap
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
Compression$
public Compression$()
-
-
Method Details
-
gzipDecompress
Creates a Flow that decompresses gzip-compressed stream of data.- Parameters:
maxBytesPerChunk- Maximum length of the outputpekko.util.ByteStringchunk.- Since:
- 1.3.0
-
inflate
Creates a Flow that decompresses deflate-compressed stream of data.- Parameters:
maxBytesPerChunk- Maximum length of the outputpekko.util.ByteStringchunk.
-
inflate
Same asinflate(int)with configurable maximum output length and nowrap- Parameters:
maxBytesPerChunk- Maximum length of the outputpekko.util.ByteStringchunk.nowrap- if true then use GZIP compatible decompression
-
gzip
Creates a flow that gzip-compresses a stream of ByteStrings. Note that the compressor will flush after every single element in stream so 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. -
gzip
Same asgzip()with a custom level.- Parameters:
level- Compression level (0-9)
-
gzip
Same asgzip()with a custom level and configurable flush mode.- Parameters:
level- Compression level (0-9)autoFlush- If true will automatically flush after every single element in the stream.- Since:
- 1.3.0
-
deflate
Creates a flow that deflate-compresses a stream of ByteString. Note that the compressor will flush after every single element in stream so 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. -
deflate
Same asdeflate()with configurable level and nowrap- Parameters:
level- Compression level (0-9)nowrap- if true then use GZIP compatible compression
-
deflate
Same asdeflate()with configurable level, nowrap and autoFlush.- Parameters:
level- Compression level (0-9)nowrap- if true then use GZIP compatible compressionautoFlush- If true will automatically flush after every single element in the stream.- Since:
- 1.3.0
-