#include <chmxx.h>
Public Methods | |
chmistream (const chmfile &chm, const std::string &path, size_t buf_size=1024) | |
Create a new input stream from archive for given path. | |
std::streamsize | read_left () const |
Returns the number of bytes that are left to be read from this stream. | |
virtual | ~chmistream () |
size_t | get_encint () |
Get little endian MS encint from the stream. | |
unsigned long | get_dword () |
Get local endianized MS dword (2 x 2 bytes) from the stream. | |
unsigned int | get_word () |
Get local endianized MS word (2 bytes) from the stream. | |
unsigned long | get_sr (int s, int r, int &pos) |
Get a s-r encoded value from the stream. | |
void | get_sr_finish (int &pos) |
chm::chmfile chm("/chmfile.chm"); chm::chmistream in(chm, "/path"); string line; while ( readline(chm, line) ) { cout << line; }
Definition at line 148 of file chmxx.h.
|
Create a new input stream from archive for given path.
|
|
|
|
Get local endianized MS dword (2 x 2 bytes) from the stream.
|
|
Get little endian MS encint from the stream.
|
|
Get a s-r encoded value from the stream. Scale must alwqays be 2. Use 0 for initial pos. When finished reading an entry of sr-s call the get_sr_finish(pos). |
|
|
|
Get local endianized MS word (2 bytes) from the stream.
|
|
Returns the number of bytes that are left to be read from this stream. So returns the size of file when nothing has been read. |