CPPMyth
Library to interoperate with MythTV server
NSROOT::Decompressor Class Reference

Public Types

typedef int(* STREAM_READER) (void *handle, void *buf, int sz)
 

Public Member Functions

 Decompressor (STREAM_READER reader, void *handle)
 
 Decompressor (const char *input, size_t len)
 
bool HasOutputData ()
 More data can be read from output stream. More...
 
bool IsCompleted ()
 Output stream is completed. More...
 
bool HasBufferError ()
 Data cannot be read from input. More...
 
bool HasStreamError ()
 Data error occurred from stream. More...
 
size_t ReadOutput (char *buf, size_t len)
 Copy data from output stream to the given pointer until size limit. More...
 
size_t FetchOutput (const char **data)
 Fetch next chunk of data from output stream. No copy of data is performed and result can be used as is. More...
 

Private Types

enum  { MEM_BUFFER, FCB_READER }
 

Private Member Functions

size_t NextChunk ()
 

Static Private Member Functions

static int _init (void *zp, void *out, size_t len)
 

Private Attributes

int m_status
 
bool m_stop
 
size_t m_chunk_size
 
enum NSROOT::Decompressor:: { ... }  m_type_in
 
size_t m_input_len
 
const char * m_input
 
STREAM_READER m_rstream
 
void * m_rstream_hdl
 
char * m_rstream_buf
 
char * m_output
 
size_t m_output_pos
 
size_t m_output_len
 
void * _opaque
 

Detailed Description

Definition at line 112 of file compressor.h.

Member Function Documentation

◆ FetchOutput()

size_t Decompressor::FetchOutput ( const char **  data)

Fetch next chunk of data from output stream. No copy of data is performed and result can be used as is.

Parameters
datapointer to const data pointer
Returns
the byte count available from the pointer to const data

Definition at line 412 of file compressor.cpp.

◆ HasBufferError()

bool Decompressor::HasBufferError ( )

Data cannot be read from input.

Returns
Input status

Definition at line 347 of file compressor.cpp.

◆ HasOutputData()

bool NSROOT::Decompressor::HasOutputData ( )
inline

◆ HasStreamError()

bool Decompressor::HasStreamError ( )

Data error occurred from stream.

Returns
stream status

Definition at line 352 of file compressor.cpp.

◆ IsCompleted()

bool Decompressor::IsCompleted ( )

Output stream is completed.

Returns
Output stream status

Definition at line 342 of file compressor.cpp.

◆ ReadOutput()

size_t Decompressor::ReadOutput ( char *  buf,
size_t  len 
)

Copy data from output stream to the given pointer until size limit.

Parameters
bufpointer to copy data
lenmax length of data
Returns
lenght of copied data

Definition at line 365 of file compressor.cpp.


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