|
byteme
C++ wrappers for buffered inputs
|
Read a file that may or may not be Gzipped. More...
#include <SomeFileReader.hpp>


Public Member Functions | |
| SomeFileReader (const char *path, const SomeFileReaderOptions &options) | |
| bool | load () |
| const unsigned char * | buffer () const |
| std::size_t | available () const |
Public Member Functions inherited from byteme::Reader | |
Read a file that may or may not be Gzipped.
This class will automatically detect whether path refers to a text file or a Gzip-compressed file, based on its initial magic numbers. After that, it will dispatch appropriately to RawFileReader or GzipFileReader respectively.
|
inline |
| path | Path to the file. |
| options | Further options. |
|
inlinevirtual |
This method should only be called after load() has been called and returns true. The return value is generally expected to be positive; however, it is possible to return a zero. Note that zero values should not be interpreted as the end of the source, which is strictly only defined by load() returning false.
buffer(). Implements byteme::Reader.
|
inlinevirtual |
This method should only be called after load() has been called and returns true.
available(). Implements byteme::Reader.
|
inlinevirtual |
Read the next chunk of bytes from the input source. To read the entire source, this function should be called repeatedly until false is returned. After returning false once, the behavior of subsequent calls is undefined.
false, it can be assumed that the end of the source was reached. Implements byteme::Reader.