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
sourceReadOnlyMemory<byte>The data to compress
destinationMemory<byte>Memory to write compressed data to
bytesWrittenintThe number of bytes written to the destination
Returns
- bool
true if compression was successful, false if the destination buffer is too small