catconf

Function read_from_file

Source
pub fn read_from_file<F>(
    magic_bytes: &[u8],
    window_size: i64,
    input: &mut F,
) -> Result<Vec<u8>>
where F: Seek + Read,
Expand description

Allows for reading for configuration from the end of a file by looking for magic bytes

ยงExample

use catconf::read_from_file;

let conf = read_from_file(b"CATCONF", 2048, &mut input)?;