fn read_snapshot(
    directory_path: &Path,
    lsn: u64,
) -> io::Result<(FnvHashMap<ObjectId, UpdateMetadata>, u64)> {
    log::trace!("reading snapshot {lsn}");
    let mut reusable_frame_buffer: Vec<u8> = vec![];
    let mut file =
        fallible!(fs::File::open(snapshot_path(directory_path, lsn, false)));
    let size = fallible!(file.metadata()).len();
    let raw_frame = read_frame(&mut file, &mut reusable_frame_buffer)?;

    let frame: FnvHashMap<ObjectId, UpdateMetadata> = raw_frame
        .into_iter()
        .map(|update_metadata| (update_metadata.object_id(), update_metadata))
        .collect();

    log::trace!("recovered {} items in snapshot {}", frame.len(), lsn);

    Ok((frame, size))
}
returns the data from the snapshot as well as the size of the snapshot
src/metadata_store.rs