|   | CompressionExtensionsCompress(Stream, CompressionStrength) Method | 
        
        
            Compress a stream using specified compression strength.
            
        
        Namespace: GSF.IO.CompressionAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.257-beta+00aa2366fbb9ec75f636ebc7cfa610e3826a727c
 Syntax
Syntax<ExtensionAttribute>
Public Shared Function Compress ( 
	source As Stream,
	strength As CompressionStrength
) As MemoryStream
public:
[ExtensionAttribute]
static MemoryStream^ Compress(
	Stream^ source, 
	CompressionStrength strength
)
[<ExtensionAttribute>]
static member Compress : 
        source : Stream * 
        strength : CompressionStrength -> MemoryStream GSF.IO.Compression.CompressionExtensions.Compress = function(source, strength);
Parameters
- source  Stream
- The Stream to compress.
- strength  CompressionStrength
- The CompressionStrength of the compression.
Return Value
MemoryStreamReturns a 
MemoryStream of the compressed 
Stream.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type 
Stream. When you use instance method syntax to call this method, omit the first parameter. For more information, see 
Extension Methods (Visual Basic) or 
Extension Methods (C# Programming Guide).
 Remarks
Remarks
            This returns a memory stream of the compressed results, if the incoming stream is
            very large this will consume a large amount memory.  In this case use the overload
            that takes the destination stream as a parameter instead.
            
 See Also
See Also