OpenPetra
Free Administration Software for Non-Profits
Ict.Common.IO.TFileHelper.Streams.Compression Class Reference

Helps in handling Zip-compression of Streams and files. More...

Static Public Member Functions

static MemoryStream DeflateFileIntoMemoryStream (string AFilePath)
 Loads a file, Zip-compresses it in memory and returns it as a MemoryStream. More...
 
static MemoryStream DeflateFilesIntoMemoryStream (string[] AFilePaths, Boolean APreservePath, String AZipPassword)
 Loads a any number of files, Zip-compresses them in memory into one Zip archive and returns it as a MemoryStream. More...
 
static MemoryStream InflateFilesFromStream (Stream AZippedStream)
 Uncompress a Zip-compressed Stream into a MemoryStream. More...
 

Detailed Description

Helps in handling Zip-compression of Streams and files.

Member Function Documentation

◆ DeflateFileIntoMemoryStream()

static MemoryStream Ict.Common.IO.TFileHelper.Streams.Compression.DeflateFileIntoMemoryStream ( string  AFilePath)
inlinestatic

Loads a file, Zip-compresses it in memory and returns it as a MemoryStream.

Parameters
AFilePathFilename (including Path) to read from.
Returns
A MemoryStream with the Zip-compressed contents of the file specified in AFilePath .

◆ DeflateFilesIntoMemoryStream()

static MemoryStream Ict.Common.IO.TFileHelper.Streams.Compression.DeflateFilesIntoMemoryStream ( string[]  AFilePaths,
Boolean  APreservePath,
String  AZipPassword 
)
inlinestatic

Loads a any number of files, Zip-compresses them in memory into one Zip archive and returns it as a MemoryStream.

Parameters
AFilePathsArray of Filenames (including Paths) to read from.
APreservePathtrue to create a folder structure in the ZIP
AZipPasswordempty for no password
Returns
A MemoryStream with the Zip-compressed contents of all the files specified in AFilePaths .

◆ InflateFilesFromStream()

static MemoryStream Ict.Common.IO.TFileHelper.Streams.Compression.InflateFilesFromStream ( Stream  AZippedStream)
inlinestatic

Uncompress a Zip-compressed Stream into a MemoryStream.

Parameters
AZippedStreamStream containing files that are Zip-compressed.
Returns
A MemoryStream with the uncompressed contents of the Stream specified in AZippedStream .

The documentation for this class was generated from the following file: