Expand description
Representation and parsing for osu! binary formats: beatmap listing, collections, replays and scores.
§A note on strings
The osu .db
file format allows for strings to be absent.
This notably happens with the unicode versions of titles and authors.
For this reason all of the parsed strings are expressed as Option<String>
instead of a
simple String
.
You can default to an empty string by using string.unwrap_or_default()
, which does no
allocations and is very cheap.
§A note on features and replays
By default, replay data will be decompressed and parsed, using the xz2
dependency.
To disable this behaviour and remove the dependency on xz2
, disable the compression
feature:
osu-db = { version = "*", default-features = false }
When compression
is disabled, the
Replay::replay_data
field will always be
None
, and will be ignored when writing.
In any case, the
Replay::raw_replay_data
field is
always available.
§A note on future-proofness
Osu .db
formats are used internally by osu!, and are not intended to be shared.
There does not seem to be any public contract on breaking changes, and breaking changes
already occured twice (in 2014 and 2019), so this library might not work with future versions
of osu!.
It is currently guaranteed to work on osu! .db
versions up to at least 20211103
.
The current implementation might work for a long time, or break tomorrow.
Re-exports§
pub use crate::collection::CollectionList;
pub use crate::listing::Listing;
pub use crate::replay::Replay;
pub use crate::score::ScoreList;
Modules§
- collection
- Parsing for the
collection.db
file, containing all user collections. - listing
- Parsing for the
osu!.db
file, containing cached information about the beatmap listing. - replay
- Parsing for replay and score files, which are very similar.
- score
- Parsing for the
scores.db
osu file, which contains partial replay data locally.
Structs§
- ModSet
- A combination of
Mod
s.