Package org.apache.pekko.stream.scaladsl
Class Compression$
- java.lang.Object
- 
- org.apache.pekko.stream.scaladsl.Compression$
 
- 
 public class Compression$ extends java.lang.Object
- 
- 
Field SummaryFields Modifier and Type Field Description static Compression$MODULE$Static reference to the singleton instance of this Scala object.
 - 
Constructor SummaryConstructors Constructor Description Compression$()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Flow<ByteString,ByteString,NotUsed>deflate()Creates a flow that deflate-compresses a stream of ByteString.Flow<ByteString,ByteString,NotUsed>deflate(int level, boolean nowrap)Same asdeflate()with configurable level and nowrapFlow<ByteString,ByteString,NotUsed>gunzip(int maxBytesPerChunk)Creates a Flow that decompresses a gzip-compressed stream of data.intgunzip$default$1()Flow<ByteString,ByteString,NotUsed>gzip()Creates a flow that gzip-compresses a stream of ByteStrings.Flow<ByteString,ByteString,NotUsed>gzip(int level)Same asgzip()with a custom level.Flow<ByteString,ByteString,NotUsed>inflate(int maxBytesPerChunk)Creates a Flow that decompresses a deflate-compressed stream of data.Flow<ByteString,ByteString,NotUsed>inflate(int maxBytesPerChunk, boolean nowrap)Creates a Flow that decompresses a deflate-compressed stream of data.intinflate$default$1()intMaxBytesPerChunkDefault()
 
- 
- 
- 
Field Detail- 
MODULE$public static final Compression$ MODULE$ Static reference to the singleton instance of this Scala object.
 
- 
 - 
Method Detail- 
MaxBytesPerChunkDefaultpublic final int MaxBytesPerChunkDefault() 
 - 
gzippublic Flow<ByteString,ByteString,NotUsed> 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 
 - 
gzippublic Flow<ByteString,ByteString,NotUsed> gzip(int level) Same asgzip()with a custom level.- Parameters:
- level- Compression level (0-9)
 
 - 
gunzippublic Flow<ByteString,ByteString,NotUsed> gunzip(int maxBytesPerChunk) Creates a Flow that decompresses a gzip-compressed stream of data.- Parameters:
- maxBytesPerChunk- Maximum length of an output- pekko.util.ByteStringchunk.
 
 - 
gunzip$default$1public int gunzip$default$1() 
 - 
deflatepublic Flow<ByteString,ByteString,NotUsed> 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 
 - 
deflatepublic Flow<ByteString,ByteString,NotUsed> deflate(int level, boolean nowrap) Same asdeflate()with configurable level and nowrap- Parameters:
- level- Compression level (0-9)
- nowrap- if true then use GZIP compatible compression
 
 - 
inflatepublic Flow<ByteString,ByteString,NotUsed> inflate(int maxBytesPerChunk) Creates a Flow that decompresses a deflate-compressed stream of data.- Parameters:
- maxBytesPerChunk- Maximum length of an output- pekko.util.ByteStringchunk.
 
 - 
inflatepublic Flow<ByteString,ByteString,NotUsed> inflate(int maxBytesPerChunk, boolean nowrap) Creates a Flow that decompresses a deflate-compressed stream of data.- Parameters:
- maxBytesPerChunk- Maximum length of an output- pekko.util.ByteStringchunk.
- nowrap- if true then use GZIP compatible decompression
 
 - 
inflate$default$1public int inflate$default$1() 
 
- 
 
-