Expand description
Aggligator transport wrapper using zstd compression
This compresses the data sent over each Aggligator link using zstd.
The wrapper must be used on both ends of a connection, since compression is not negotiated. The compression level only affects the sending side and thus may differ between both ends.
Compression only pays off when the transferred data is compressible and the links, not the CPU, are the bottleneck. Data that is already compressed or encrypted does not become smaller. Alternatively, the application can compress the data of the aggregated connection itself, which compresses the data only once instead of separately on each link.
§Combining with TLS
Wrappers are applied in the order they are added, thus the first wrapper is applied directly to the transport. To compress data before it is encrypted, add the TLS wrapper first and then this wrapper.
Compressing data before encrypting it may reveal information about the data through the length of the encrypted data. This allows attacks if data controlled by an attacker is transferred together with secret data over the same connection.
§Example
use aggligator::transport::ConnectorBuilder;
use aggligator_wrapper_zstd::Zstd;
let mut builder = ConnectorBuilder::new(Default::default());
builder.wrap(Zstd::new());
let connector = builder.build();Structs§
- Zstd
- zstd compression wrapper for outgoing and incoming links.