remozipsy 0.2.0

Remote Zip Sync - sync remote zip to local fs
Documentation
#[cfg(feature = "serde-derive")]
use serde::{Deserialize, Serialize};

/// Used in this crate's traits to interact with [`FileSystem`] and
/// [`RemoteZip`]
///
/// [`FileSystem`]: crate::FileSystem
/// [`RemoteZip`]: crate::RemoteZip
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde-derive", derive(Deserialize, Serialize))]
pub struct FileInfo {
    /// with stripped prefix
    pub local_unix_path: String,
    /// It's recommended to use `crc32fast::hash`
    pub crc32: u32,
}

/// Use this to provide internal zip information to this crate.
/// If you don't want to go low-level and build this yourself, use the
/// [`fetch_remote_file_info`] helper method.
///
/// [`fetch_remote_file_info`]: crate::fetch_remote_file_info
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde-derive", derive(Deserialize, Serialize))]
pub struct RemoteFileInfo {
    pub crc32: u32,
    pub compressed_size: u32,
    pub uncompressed_size: u32,
    pub compression_method: u16,
    pub file_name: String,
    pub start_offset: u32,

    // needed to estimate end
    pub file_name_length: u16,
    pub extra_field_length: u16,
    pub offset_of_start_of_central_directory_with_respect_to_the_starting_disk_number: u32,
}