|   | CompressionExtensionsCompress(Byte, Int32, Int32, CompressionStrength) Method | 
        
        
            Compress a byte array using specified compression method.
            
        
        Namespace: GSF.IO.CompressionAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.257-beta+00aa2366fbb9ec75f636ebc7cfa610e3826a727c
 Syntax
Syntaxpublic static byte[] Compress(
	this byte[] source,
	int startIndex,
	int length,
	CompressionStrength strength
)
<ExtensionAttribute>
Public Shared Function Compress ( 
	source As Byte(),
	startIndex As Integer,
	length As Integer,
	strength As CompressionStrength
) As Byte()
public:
[ExtensionAttribute]
static array<unsigned char>^ Compress(
	array<unsigned char>^ source, 
	int startIndex, 
	int length, 
	CompressionStrength strength
)
[<ExtensionAttribute>]
static member Compress : 
        source : byte[] * 
        startIndex : int * 
        length : int * 
        strength : CompressionStrength -> byte[] GSF.IO.Compression.CompressionExtensions.Compress = function(source, startIndex, length, strength);
Parameters
- source  Byte
- The Byte array to compress.
- startIndex  Int32
- An Int32 representing the start index of the byte array.
- length  Int32
- The number of bytes to read into the byte array for compression.
- strength  CompressionStrength
- The specified CompressionStrength.
Return Value
ByteA compressed version of the source 
Byte array.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type 
Byte. 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).
 See Also
See Also