dxFeed .Net API  7.1.0
dxFeed .Net API library intended to provide market data access for DX clients
com.dxfeed.io.StreamCompression Class Reference

Defines byte stream compression format. More...

Collaboration diagram for com.dxfeed.io.StreamCompression:
[legend]

Public Types

enum  CompressionType { None, Gzip, Zip }
 Supported compression types. More...
 

Public Member Functions

Stream Decompress (Stream inputStream)
 Decompresses the given input stream with this compression format. More...
 

Static Public Member Functions

static StreamCompression DetectCompressionByMimeType (string mimeType)
 Detects compression format by the mime type. More...
 
static StreamCompression DetectCompressionByExtension (string fileName)
 Detects compression format by the extension at the end of the file name. More...
 
static StreamCompression DetectCompressionByExtension (Uri fileUri)
 Detects compression format by the extension at the end of the file name. More...
 

Static Public Attributes

static StreamCompression NONE = new StreamCompression(CompressionType.None, "none", "", "")
 No compression. More...
 
static StreamCompression GZIP = new StreamCompression(CompressionType.Gzip, "gzip", "application/gzip", ".gz")
 Gzip compression format. More...
 
static StreamCompression ZIP = new StreamCompression(CompressionType.Zip, "zip", "application/zip", ".zip")
 Zip compression format. More...
 

Detailed Description

Defines byte stream compression format.

Supported compression formats are: NONE, GZIP(.gz), ZIP(.zip). NONE compression format serves as a null object and does not do anything.

Member Enumeration Documentation

◆ CompressionType

Supported compression types.

Member Function Documentation

◆ Decompress()

Stream com.dxfeed.io.StreamCompression.Decompress ( Stream  inputStream)
inline

Decompresses the given input stream with this compression format.

Parameters
inputStreamIn the input stream.
Returns
The decompressed stream or an original stream if this compression format is NONE.
Exceptions
ArgumentExceptionIf input stream is null.
IOExceptionIf an I/O error occurs.

◆ DetectCompressionByExtension() [1/2]

static StreamCompression com.dxfeed.io.StreamCompression.DetectCompressionByExtension ( string  fileName)
inlinestatic

Detects compression format by the extension at the end of the file name.

Parameters
fileNameThe file name.
Returns
Detected compression format or NONE is the file name extension is not recognized.
Exceptions
ArgumentExceptionIf fileName is null.

◆ DetectCompressionByExtension() [2/2]

static StreamCompression com.dxfeed.io.StreamCompression.DetectCompressionByExtension ( Uri  fileUri)
inlinestatic

Detects compression format by the extension at the end of the file name.

Parameters
fileUriThe file name Uri object.
Returns
Detected compression format or NONE is the file name extension is not recognized.
Exceptions
ArgumentExceptionIf fileUri is null.

◆ DetectCompressionByMimeType()

static StreamCompression com.dxfeed.io.StreamCompression.DetectCompressionByMimeType ( string  mimeType)
inlinestatic

Detects compression format by the mime type.

Parameters
mimeTypeThe mime type.
Returns
Detected compression format or NONE is the mime type is not recognized.
Exceptions
ArgumentNullExceptionIf mimeType is null.

Field Documentation

◆ GZIP

StreamCompression com.dxfeed.io.StreamCompression.GZIP = new StreamCompression(CompressionType.Gzip, "gzip", "application/gzip", ".gz")
static

Gzip compression format.

◆ NONE

StreamCompression com.dxfeed.io.StreamCompression.NONE = new StreamCompression(CompressionType.None, "none", "", "")
static

No compression.

◆ ZIP

StreamCompression com.dxfeed.io.StreamCompression.ZIP = new StreamCompression(CompressionType.Zip, "zip", "application/zip", ".zip")
static

Zip compression format.


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