A module for loading files into memory.
More...
Inherits CriDisposable.
|
override void | Dispose () |
| Discards the loader. More...
|
|
void | Load (CriFsBinder binder, string path, long fileOffset, long loadSize, byte[] buffer) |
| Starts loading data. More...
|
|
void | LoadById (CriFsBinder binder, int id, long fileOffset, long loadSize, byte[] buffer) |
| Starts loading data. More...
|
|
void | LoadWithoutDecompression (CriFsBinder binder, string path, long fileOffset, long loadSize, byte[] buffer) |
| Loads the compressed data into memory without expanding it. More...
|
|
void | LoadWithoutDecompressionById (CriFsBinder binder, int id, long fileOffset, long loadSize, byte[] buffer) |
| Loads the compressed data into memory without expanding it. More...
|
|
void | DecompressData (long srcSize, byte[] srcBuffer, long dstSize, byte[] dstBuffer) |
| Starts decompressing the compressed data place on the memory. More...
|
|
void | Stop () |
| Stops the loading process. More...
|
|
Status | GetStatus () |
| Gets the loader status. More...
|
|
void | SetReadUnitSize (int unit_size) |
| Sets the unit read size More...
|
|
A module for loading files into memory.
- Description:
- A module for loading files into memory.
By combining with CriWare.CriFsBinder , the content in the CPK file can also be read.
- See also
- CriFsBinder
A value indicating the loader status.
- See also
- CriFsLoader::GetStatus
Enumerator |
---|
Stop |
Stopped
|
Loading |
Loading
|
Complete |
Loading complete
|
Error |
Error occurred
|
override void Dispose |
( |
| ) |
|
|
inline |
Discards the loader.
- Note:
- If you discard the loader during the loading process, the process may be blocked in this function for a long time.
void Load |
( |
CriFsBinder |
binder, |
|
|
string |
path, |
|
|
long |
fileOffset, |
|
|
long |
loadSize, |
|
|
byte[] |
buffer |
|
) |
| |
|
inline |
Starts loading data.
- Parameters
-
binder | Binder |
path | File path name |
fileOffset | Offset from the beginning of the file (in bytes) |
loadSize | Load request size (in bytes) |
buffer | Load destination buffer |
- Description:
- Starts reading data with the specified binder and file name.
Read loadSize bytes from offset fileOffset in the file.
This function returns immediately.
To get the load completion status, use the CriWare.CriFsLoader::GetStatus function.
- See also
- CriFsLoader::GetStatus
void LoadById |
( |
CriFsBinder |
binder, |
|
|
int |
id, |
|
|
long |
fileOffset, |
|
|
long |
loadSize, |
|
|
byte[] |
buffer |
|
) |
| |
|
inline |
Starts loading data.
- Parameters
-
binder | Binder |
id | File ID |
fileOffset | Offset from the beginning of the file (in bytes) |
loadSize | Load request size (in bytes) |
buffer | Load destination buffer |
- Description:
- Starts reading data with the specified binder and file ID.
Read loadSize bytes from offset fileOffset in the file.
This function returns immediately.
To get the load completion status, use the CriWare.CriFsLoader::GetStatus function.
- See also
- CriFsLoader::GetStatus
void LoadWithoutDecompression |
( |
CriFsBinder |
binder, |
|
|
string |
path, |
|
|
long |
fileOffset, |
|
|
long |
loadSize, |
|
|
byte[] |
buffer |
|
) |
| |
|
inline |
void LoadWithoutDecompressionById |
( |
CriFsBinder |
binder, |
|
|
int |
id, |
|
|
long |
fileOffset, |
|
|
long |
loadSize, |
|
|
byte[] |
buffer |
|
) |
| |
|
inline |
void DecompressData |
( |
long |
srcSize, |
|
|
byte[] |
srcBuffer, |
|
|
long |
dstSize, |
|
|
byte[] |
dstBuffer |
|
) |
| |
|
inline |
Starts decompressing the compressed data place on the memory.
- Parameters
-
srcSize | Compressed data size (in bytes) |
srcBuffer | The buffer containing the compressed data |
dstSize | Size of the expansion destination buffer (in bytes) |
dstBuffer | Expansion destination buffer |
- Description:
- Expands the compressed data placed on the memory to another memory area.
This function returns immediately.
To get the load completion status, use the criFsLoader_GetStatus function.
- Note:
- If the input data is not compressed, this function copies the input data to the output address as is.
- Note:
- This function supports only CRI proprietary software compression codec.
This function cannot be used to expand the data when using a hardware decoder or when using a platform-specific codec.
- See also
- CriFsLoader::GetStatus, CriFsLoader::LoadWithoutDecompression, CriFsLoader::LoadWithoutDecompressionById
Gets the loader status.
- Returns
- Status
- Description:
- Gets the loader status.
- See also
- CriFsLoader::Status
void SetReadUnitSize |
( |
int |
unit_size | ) |
|
|
inline |
Sets the unit read size
- Parameters
-
- Description:
- Sets the read unit size. When processing a read request with large size, CriFsLoader divides it into multiple reads with smaller size and repeats the reads.
It is possible to change the read unit size by using this function.
Cancellation of read request or interrupt of high priority read processing, etc. are processed only at the unit read size boundary.
Therefore, setting a smaller unit size improves the response of I/O processing.
Conversely, if you set a large unit size, the speed of reading files improves.
- See also
- CriFsLoader::Status
The documentation for this class was generated from the following file: