Class Utils
Inheritance
System.Object
Utils
Namespace: Steeltoe.Management.Endpoint
Assembly: Steeltoe.Management.EndpointBase.dll
Syntax
public static class Utils : object
Methods
| Edit this page View SourceCompressFile(String, String, ILogger)
Applies GZip compression to a file on disk, returns it as a stream and deletes the original file
Declaration
public static Stream CompressFile(string filename, string gzFilename, ILogger logger = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | filename | Path of file to load |
System.String | gzFilename | Name to use for compressed output |
ILogger | logger |
Returns
Type | Description |
---|---|
Stream | A filestream with the file's compressed contents |
CompressFileAsync(String, String, ILogger)
Applies GZip compression to a file on disk, returns it as a stream and deletes the original file
Declaration
public static async Task<Stream> CompressFileAsync(string filename, string gzFilename, ILogger logger = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | filename | Path of file to load |
System.String | gzFilename | Name to use for compressed output |
ILogger | logger |
Returns
Type | Description |
---|---|
Task<Stream> | A filestream with the file's compressed contents |