|
ADPCM Codecs
|
Bounds checked reader for a memory buffer. Reads past the end return 0 and move the position to the end. The "U" (unchecked) variants do not check the remaining size and must only be used after bytesLeft() was tested. More...
#include <ByteReader.h>
Public Member Functions | |
| ByteReader (const uint8_t *buf, int buf_size) | |
| void | init (const uint8_t *buf, int buf_size) |
| int | bytesLeft () const |
| number of bytes between the current position and the end | |
| int | tell () const |
| current position relative to the start of the buffer | |
| int | size () const |
| total size of the buffer | |
| void | skip (unsigned int size) |
| skips up to size bytes (stops at the end of the buffer) | |
| void | skipUnchecked (unsigned int size) |
| skips size bytes without checking the buffer end | |
| int | seek (int offset, int whence) |
| moves the position; returns the new position or an error code | |
| uint32_t | getByteUnchecked () |
| uint32_t | getLe16Unchecked () |
| uint32_t | getBe16Unchecked () |
| uint32_t | getLe32Unchecked () |
| uint32_t | getBe32Unchecked () |
| uint32_t | getByte () |
| uint32_t | getLe16 () |
| uint32_t | getBe16 () |
| uint32_t | getLe32 () |
| uint32_t | getBe32 () |
Bounds checked reader for a memory buffer. Reads past the end return 0 and move the position to the end. The "U" (unchecked) variants do not check the remaining size and must only be used after bytesLeft() was tested.