[−][src]Macro include_flate_codegen::deflate_file
deflate_file!() { /* proc-macro */ }deflate_file!("file") is equivalent to include_bytes!("file.gz").
Parameters
This macro accepts exactly one literal parameter that refers to a path, either absolute or relative to CARGO_MANIFEST_DIR.
Note that this is distinct from the behaviour of the builtin include_bytes!/include_str! macros —
includle_bytes!/include_str! paths are relative to the current source file, while deflate_file! paths are relative to
CARGO_MANIFEST_DIR.
Returns
This macro expands to a &[u8] literal that contains the deflated form of the file.
Compile errors
- If the argument is not a single literal
- If the referenced file does not exist or is not readable