pub struct Cache { /* private fields */ }Expand description
A complete virtual representation of the RuneScape cache file system.
Implementations
Creates a high level virtual memory map over the cache directory.
All files are isolated on allocation by keeping them as in-memory files.
Errors
The bulk of the errors which might occur are mostely I/O related due to acquiring file handles.
Other errors might include protocol changes in newer caches. Any error unrelated to I/O at this stage should be considered a bug.
Generate a checksum based on the current cache.
The Checksum acts as a validator for individual cache files.
Any RuneScape client will request a list of crc’s to check the validity
of all of the file data that was transferred.
This is supported on crate feature rs3 only.
rs3 only.Generate a checksum based on the current cache with RSA encryption.
RsaChecksum wraps a regular Checksum with the added benefit of encrypting
the whirlpool hash into the checksum buffer.
Retrieves and constructs data corresponding to the given index and archive.
Errors
When trying to retrieve data from an index or an archive that does not exist
the IndexNotFound or ArchiveNotFound errors are returned, respectively.
Any other errors such as sector validation failures or failed parsers should be considered a bug.