/// Writes extent cluster to the image file.
///
/// # Arguments
///
/// `out_stream`    : Points to the image file stream.
/// `in_stream`     : Stream from where extent data will be read from.
/// `current_offset`: Starting position of the cluster within the image file.
/// `last_cluster`  : True if this is the last cluster within the extracted image file.
///                   Multi-cluster image files are not yet supported.
///
/// This includes computing checksum of the cluster header and all the extent infos,
/// then writing cluster header, extent info and extent data to the image file.
Writes extent cluster to the image file.
Writes extent cluster to the image file .
pub fn write(
        &mut self,
        mut in_stream: &mut dyn ReadAndSeek,
        _current_offset: u64,
        last_cluster: bool,
        mut out_stream: &mut dyn Write,
    ) -> Result<u64, Error> {
        if !last_cluster {
            todo!("Support for more than one cluster is not implemented.")
        }
        self.check_extent_tree();
        // Update all the extent location w.r.t. starting of the extent cluster.
        let _data_size = self.data_size();
        let mut size = self.write_metadata(out_stream)?;
        size = size + self.write_data(&mut in_stream, &mut out_stream)?;
        Ok(size)
    }
pub fn write ( & mut self , mut in_stream : & mut dyn ReadAndSeek , _current_offset : u64 , last_cluster : bool , mut out_stream : & mut dyn Write , ) -> Result < u64 , Error > { if ! last_cluster { todo ! ( " " ) } self . check_extent_tree ( ) ; // Update all the extent location w.r.t. starting of the extent cluster. let _data_size = self . data_size ( ) ; let mut size = self . write_metadata ( out_stream ) ? ; size = size + self . write_data ( & mut in_stream , & mut out_stream ) ? ; Ok ( size ) }
Writes extent cluster to the image file.
Writes extent cluster to the image file .
&mut self
in_stream
&mut dyn ReadAndSeek
_current_offset
u64
last_cluster
bool
out_stream
&mut dyn Write