Interface ITryCompressionCodec
public interface ITryCompressionCodec : ICompressionCodec, IDisposable
- Inherited Members
Methods
TryCompress(ReadOnlyMemory<byte>, Memory<byte>, out int)
Try to write compressed data to a fixed length memory span
bool TryCompress(ReadOnlyMemory<byte> source, Memory<byte> destination, out int bytesWritten)
Parameters
source
ReadOnlyMemory<byte>The data to compress
destination
Memory<byte>Memory to write compressed data to
bytesWritten
intThe number of bytes written to the destination
Returns
- bool
true if compression was successful, false if the destination buffer is too small