Knight Data Access Layer
CompressBytes(Byte[]) Method
Example 




KellermanSoftware.NetDataAccessLayer Namespace > Compression Class > CompressBytes Method : CompressBytes(Byte[]) Method
Compress the passed in bytes using LZO compression
Syntax
Public Overloads Function CompressBytes( _
   ByVal inputBytes() As Byte _
) As Byte()
Dim instance As Compression
Dim inputBytes() As Byte
Dim value() As Byte
 
value = instance.CompressBytes(inputBytes)
public byte[] CompressBytes( 
   byte[] inputBytes
)
public: byte[]* CompressBytes( 
   byte[]* inputBytes
) 
public:
array<byte>^ CompressBytes( 
   array<byte>^ inputBytes
) 

Parameters

inputBytes
Example
string inputString = "".PadRight(1000, 'z');
            Compression compression = new Compression();
            byte[] inputBytes = Encoding.UTF8.GetBytes(inputString);
            byte[] compressedBytes = compression.CompressBytes(inputBytes);
            byte[] decompressedBytes = compression.DecompressBytes(compressedBytes);
Dim inputString As String = "".PadRight(1000, "z"c)
            Dim compression As New Compression()
            Dim inputBytes() As Byte = Encoding.UTF8.GetBytes(inputString)
            Dim compressedBytes() As Byte = compression.CompressBytes(inputBytes)
            Dim decompressedBytes() As Byte = compression.DecompressBytes(compressedBytes)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Compression Class
Compression Members
Overload List