ByteArrayExtensionsCompress Method
Compresses the provided
bytes and returns the compressed data.
Compressed data can be decompressed by
Decompress method.
Namespace: KGySoft.CoreLibrariesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
public static byte[] Compress(
this byte[] bytes
)
<ExtensionAttribute>
Public Shared Function Compress (
bytes As Byte()
) As Byte()
public:
[ExtensionAttribute]
static array<unsigned char>^ Compress(
array<unsigned char>^ bytes
)
[<ExtensionAttribute>]
static member Compress :
bytes : byte[] -> byte[]
- bytes Byte
- The bytes to compress.
ByteCompressed data. It is not guaranteed that compressed data is shorter than original one.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).