Function savefile::save_compressed [−][src]
pub fn save_compressed<T: WithSchema + Serialize>(
writer: &mut dyn Write,
version: u32,
data: &T
) -> Result<(), SavefileError>
Expand description
Write the given data
to the writer
. Compresses data using ‘snappy’ compression format.
The current version of data must be version
.
The resultant data can be loaded using the regular load-function (it autodetects if compressions was
active or not).