A reader over the contents of a file.
More...
#include <sqsh_file_private.h>
A reader over the contents of a file.
Definition at line 174 of file sqsh_file_private.h.
◆ sqsh_file_reader_advance()
Advances the file reader by a certain amount of data and presents size
bytes of data to the user.
- Deprecated
- Since 1.5.0. Use sqsh_file_reader_advance2() instead.
- Parameters
-
[in,out] | reader | The file reader to skip data in. |
[in] | offset | The offset to skip. |
[in] | size | The size of the data to skip. |
- Returns
- 0 on success, less than 0 on error.
◆ sqsh_file_reader_advance2()
int sqsh_file_reader_advance2 |
( |
struct SqshFileReader * | reader, |
|
|
uint64_t | offset, |
|
|
size_t | size ) |
Advances the file reader by a certain amount of data and presents size
bytes of data to the user.
- Parameters
-
[in,out] | reader | The file reader to skip data in. |
[in] | offset | The offset to skip. |
[in] | size | The size of the data to skip. |
- Returns
- 0 on success, less than 0 on error.
◆ sqsh_file_reader_data()
const uint8_t * sqsh_file_reader_data |
( |
const struct SqshFileReader * | reader | ) |
|
Gets a pointer to the current data in the file reader.
- Parameters
-
[in] | reader | The file reader to get data from. |
- Returns
- A pointer to the current data in the file reader.
◆ sqsh_file_reader_free()
Cleans up resources used by a SqshFileReader struct.
- Parameters
-
[in,out] | reader | The file reader struct to clean up. |
- Returns
- 0 on success, less than 0 on error.
◆ sqsh_file_reader_new()
Initializes a SqshFileReader struct.
- Parameters
-
[in] | file | The file context to retrieve the file contents from. |
[out] | err | Pointer to an int where the error code will be stored. |
- Returns
- a new file reader.
◆ sqsh_file_reader_size()
Gets the size of the current data in the file reader.
- Parameters
-
[in] | reader | The file reader to get data from. |
- Returns
- The size of the current data in the file reader.
The documentation for this struct was generated from the following files: