Class CompressionUtilities
Предоставляет методы работы по упаковке (сжатию) и распаковке данных.
Inheritance
System.Object
CompressionUtilities
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Terrasoft.Common
Assembly: Terrasoft.Common.dll
Syntax
[ComVisible(true)]
public class CompressionUtilities
Fields
ZipFileExtention
Declaration
public const string ZipFileExtention = ".gz"
Field Value
Type | Description |
---|---|
System.String |
Methods
UnZip(Byte[])
Выполняет распаковку переданного массива байтов.
Declaration
public byte[] UnZip(byte[] zippedBytes)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | zippedBytes | Массив байтов для распаковки. |
Returns
Type | Description |
---|---|
System.Byte[] | Массив распакованных байтов. |
UnZip(String)
Выполняет распаковку переданной строки.
Declaration
public string UnZip(string zippedText)
Parameters
Type | Name | Description |
---|---|---|
System.String | zippedText | Упакованная (сжатая) строка в кодировке Base64. |
Returns
Type | Description |
---|---|
System.String | Распакованное строковое представление переданного параметра |
UnzipDirectory(String, Boolean)
Declaration
public static string UnzipDirectory(string zipFilePath, bool deleteZipFileAfterUnzip = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | zipFilePath | |
System.Boolean | deleteZipFileAfterUnzip |
Returns
Type | Description |
---|---|
System.String |
Zip(Byte[])
Выполняет сжатие (упаковку) массива байтов.
Declaration
public static byte[] Zip(byte[] unzippedBytes)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | unzippedBytes | Массив байтов для сжатия (упаковки). |
Returns
Type | Description |
---|---|
System.Byte[] | Массив сжатых байтов. |
Zip(String)
Выполняет сжатие (упаковку) переданной строки.
Declaration
public string Zip(string unzippedText)
Parameters
Type | Name | Description |
---|---|---|
System.String | unzippedText | Строка для сжатия (упаковки). |
Returns
Type | Description |
---|---|
System.String | Сжатое строковое представление переданного параметра |
ZipDirectory(String, Boolean)
Declaration
public static string ZipDirectory(string directoryPath, bool deleteDirectoryAfterZip = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | directoryPath | |
System.Boolean | deleteDirectoryAfterZip |
Returns
Type | Description |
---|---|
System.String |