nlib
|
The stream class to read data according to the LZ4 frame format. More...
#include "nn/nlib/oss/Lz4InputStream.h"
Public Member Functions | |
errno_t | Init () noexcept |
Initializes the stream with the default settings. More... | |
errno_t | Init (const Lz4InputStreamSettings &settings) noexcept |
Initializes a stream. More... | |
Basic Member Functions | |
constexpr | Lz4InputStream () noexcept |
Instantiates the object with default parameters (default constructor). Must be initialized with Init() . | |
virtual | ~Lz4InputStream () noexcept override |
Destructor. | |
![]() | |
errno_t | SetStream (InputStream *istr) noexcept |
Sets the input stream for reading the pre-converted data. More... | |
InputStream * | GetStream () const noexcept |
Gets the input stream for reading the pre-converted data. More... | |
![]() | |
errno_t | GetErrorValue () const noexcept |
Gets the error value. More... | |
size_t | Pos () const noexcept |
Returns the current position in the stream. More... | |
uint64_t | Pos64 () const noexcept |
Returns the current position in the stream as a 64-bit value. More... | |
bool | IsEos () noexcept |
Returns true if the stream is finished being read through to the end. If the stream has not been read through to the end, or if an error occurs, the function returns false . More... | |
int | Read () noexcept |
Reads one byte of data from the stream. More... | |
int | Peek () noexcept |
Reads the next byte without consuming the stream. More... | |
size_t | Skip (size_t nbytes) noexcept |
Skips over the number of bytes specified by nbytes. More... | |
size_t | Read (void *ptr, size_t nbytes) noexcept |
Reads the number of bytes of data specified by nbytes into the memory region specified by ptr. More... | |
bool | Close () noexcept |
Closes the stream. Returns true if successful. More... | |
operator bool () const | |
Returns true if no internal error has occurred. | |
constexpr | InputStream () noexcept |
Instantiates the object. This function is called from the derived class. | |
virtual | ~InputStream () noexcept |
Destructor. This function is called from the derived class. | |
Additional Inherited Members | |
![]() | |
void | ResetBuffer (void *p, size_t nbytes) noexcept |
Sets the buffer held by InputStream . More... | |
void | SetError (errno_t e) const noexcept |
Sets an error to InputStream . More... | |
The stream class to read data according to the LZ4 frame format.
Definition at line 24 of file Lz4InputStream.h.
|
inlinenoexcept |
Initializes the stream with the default settings.
0 | Success. |
ENOMEM | Failed to allocate memory. |
EALREADY | Already initialized. |
EIO | An unknown error. |
Definition at line 28 of file Lz4InputStream.h.
|
noexcept |
Initializes a stream.
[in] | settings | The default options. |
0 | Success. |
ENOMEM | Failed to allocate memory. |
EALREADY | Already initialized. |
EIO | An unknown error. |
© 2012-2017 Nintendo Co., Ltd. All rights reserved.