Compress a string data to a byte array.

Namespace:  Rebex.IO.Compression
Assembly:  Rebex.Zip (in Rebex.Zip.dll)

Syntax

Visual Basic
Public Shared Function Compress ( _
	data As String, _
	dataCharSet As Encoding _
) As Byte()
C#
public static byte[] Compress(
	string data,
	Encoding dataCharSet
)

Parameters

data
Type: System..::..String
String data to compress.
dataCharSet
Type: System.Text..::..Encoding
Encoding of the input string.

Return Value

Compressed data in byte array.

Version Information

.NET Compact Framework

Supported in: 3.9, 3.5

See Also