Class Utils
- Namespace
- Steeltoe.Management.Endpoint
- Assembly
- Steeltoe.Management.EndpointBase.dll
public static class Utils
- Inheritance
-
Utils
- Inherited Members
Methods
CompressFile(string, string, ILogger)
Applies GZip compression to a file on disk, returns it as a stream and deletes the original file
public static Stream CompressFile(string filename, string gzFilename, ILogger logger = null)
Parameters
filename
stringPath of file to load
gzFilename
stringName to use for compressed output
logger
ILoggerILogger for recording exceptions
Returns
- 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
public static Task<Stream> CompressFileAsync(string filename, string gzFilename, ILogger logger = null)
Parameters
filename
stringPath of file to load
gzFilename
stringName to use for compressed output
logger
ILoggerILogger for recording exceptions