![]() |
CPPMyth
Library to interoperate with MythTV server
|
Public Types | |
| typedef int(* | STREAM_READER) (void *handle, void *buf, int sz) |
Public Member Functions | |
| Compressor (STREAM_READER reader, void *handle, int level=-1) | |
| Compressor (const char *input, size_t len, int level=-1) | |
| 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, int level) |
Definition at line 33 of file compressor.h.
| size_t Compressor::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.
| data | pointer to const data pointer |
Definition at line 172 of file compressor.cpp.
Referenced by HasOutputData(), and NSROOT::Decompressor::HasOutputData().

| bool Compressor::HasBufferError | ( | ) |
Data cannot be read from input.
Definition at line 107 of file compressor.cpp.
Referenced by HasOutputData(), and NSROOT::Decompressor::HasOutputData().

|
inline |
More data can be read from output stream.
Definition at line 46 of file compressor.h.
References FetchOutput(), HasBufferError(), HasStreamError(), IsCompleted(), and ReadOutput().
| bool Compressor::HasStreamError | ( | ) |
Data error occurred from stream.
Definition at line 112 of file compressor.cpp.
Referenced by HasOutputData(), and NSROOT::Decompressor::HasOutputData().

| bool Compressor::IsCompleted | ( | ) |
Output stream is completed.
Definition at line 102 of file compressor.cpp.
Referenced by HasOutputData(), and NSROOT::Decompressor::HasOutputData().

| size_t Compressor::ReadOutput | ( | char * | buf, |
| size_t | len | ||
| ) |
Copy data from output stream to the given pointer until size limit.
| buf | pointer to copy data |
| len | max length of data |
Definition at line 125 of file compressor.cpp.
Referenced by HasOutputData(), and NSROOT::Decompressor::HasOutputData().
