public class Compression$
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Compression$ |
MODULE$
Static reference to the singleton instance of this Scala object.
|
Constructor and Description |
---|
Compression$() |
Modifier and Type | Method and Description |
---|---|
Flow<ByteString,ByteString,NotUsed> |
deflate()
Creates a flow that deflate-compresses a stream of ByteString.
|
Flow<ByteString,ByteString,NotUsed> |
gunzip(int maxBytesPerChunk)
Creates a Flow that decompresses a gzip-compressed stream of data.
|
Flow<ByteString,ByteString,NotUsed> |
gzip()
Creates a flow that gzip-compresses a stream of ByteStrings.
|
Flow<ByteString,ByteString,NotUsed> |
inflate(int maxBytesPerChunk)
Creates a Flow that decompresses a deflate-compressed stream of data.
|
int |
MaxBytesPerChunkDefault() |
public static final Compression$ MODULE$
public final int MaxBytesPerChunkDefault()
public Flow<ByteString,ByteString,NotUsed> gzip()
ByteString
so that it is guaranteed that every ByteString
coming 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 compression level / strategy / flush mode be configurable? See https://github.com/akka/akka/issues/21849
public Flow<ByteString,ByteString,NotUsed> gunzip(int maxBytesPerChunk)
maxBytesPerChunk
- Maximum length of an output ByteString
chunk.public Flow<ByteString,ByteString,NotUsed> deflate()
ByteString
so that it is guaranteed that every ByteString
coming 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 compression level / strategy / flush mode be configurable? See https://github.com/akka/akka/issues/21849
public Flow<ByteString,ByteString,NotUsed> inflate(int maxBytesPerChunk)
maxBytesPerChunk
- Maximum length of an output ByteString
chunk.