Expand description

Methods for dumping serializable structs to a compressed binary format, used to allow fast startup times

Currently syntect serializes SyntaxSet structs with dump_to_uncompressed_file into .packdump files and likewise ThemeSet structs to .themedump files with dump_to_file.

You can use these methods to manage your own caching of compiled syntaxes and themes. And even your own serde::Serialize structures if you want to be consistent with your format.

Functions

Dumps an object to a binary array in the same format as dump_to_writer

Dumps an encodable object to a file at a given path, in the same format as dump_to_writer

To be used when serializing a SyntaxSet to a file. A SyntaxSet itself shall not be compressed, because the data for its lazy-loaded syntaxes are already compressed. Compressing another time just results in bad performance.

Dumps an object to the given writer in a compressed binary format

Returns a fully loaded object from a binary dump.

Returns a fully loaded object from a binary dump file.

A helper function for decoding and decompressing data from a reader

To be used when deserializing a SyntaxSet from raw data, for example data that has been embedded in your own binary with the include_bytes! macro.

To be used when deserializing a SyntaxSet that was previously written to file using dump_to_uncompressed_file.