C# Class NContrib.Extensions.ByteExtensions

Mostrar archivo Open project: veracross/ncontrib

Public Methods

Method Description
GZipDecompress ( this data, string encodingName = "utf-8" ) : string

Decompress a string using GZip and the specific encoding. Defaults to UTF-8

GetMime ( this data ) : string

Use MIME magic to find the MIME type of this data block. This should be the first 256 bytes of a file

ToHex ( this bytes ) : string

Returns a byte array as a hexadecimal string. No byte separators (such as spaces or dashes)

Private Methods

Method Description
FindMimeFromData ( uint pBC, [ pwzUrl, [ pBuffer, uint cbSize, [ pwzMimeProposed, uint dwMimeFlags, uint &ppwzMimeOut, uint dwReserverd ) : uint

Method Details

GZipDecompress() public static method

Decompress a string using GZip and the specific encoding. Defaults to UTF-8
public static GZipDecompress ( this data, string encodingName = "utf-8" ) : string
data this
encodingName string
return string

GetMime() public static method

Use MIME magic to find the MIME type of this data block. This should be the first 256 bytes of a file
public static GetMime ( this data ) : string
data this
return string

ToHex() public static method

Returns a byte array as a hexadecimal string. No byte separators (such as spaces or dashes)
public static ToHex ( this bytes ) : string
bytes this
return string