Table of Contents

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 string

Path of file to load

gzFilename string

Name to use for compressed output

logger ILogger

ILogger 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 string

Path of file to load

gzFilename string

Name to use for compressed output

logger ILogger

ILogger for recording exceptions

Returns

Task<Stream>

A filestream with the file's compressed contents