[−][src]Struct bdf::io::BDFWriter
Methods
impl BDFWriter[src]
pub fn new(inner: File, entry_count: u64, compress: bool) -> Self[src]
Creates a new BDFWriter.
The number for entry_count should be the total number of entries
This is required since the META chunk containing the information is the
first chunk to be written.
The number of entries can be used in tools that provide a progress
bar for how many entries were read.
If the compress parameter is true, each data chunk will be compressed
using lzma with a default level of 1.
pub fn start_threads(&self)[src]
Starts threads for parallel chunk compression
pub fn add_lookup_entry(&mut self, entry: HashEntry) -> Result<u32, Error>[src]
Adds an entry to the hash lookup table If the lookup table has already been written to the file, an error is returned
pub fn add_data_entry(&mut self, data_entry: DataEntry) -> Result<(), Error>[src]
Adds a data entry to the file. If the number of entries per chunk is reached, the data will be written to the file
pub fn finish(&mut self) -> Result<(), Error>[src]
Flushes the buffered chunk data and the writer to finish the file.
pub fn set_compression_level(&mut self, level: u32)[src]
Sets the compression level for lzma compression
pub fn set_entries_per_chunk(&mut self, number: u32) -> Result<(), Error>[src]
Changes the entries per chunk value. Returns an error if the metadata has already been written.
Auto Trait Implementations
impl !RefUnwindSafe for BDFWriter
impl Send for BDFWriter
impl Sync for BDFWriter
impl Unpin for BDFWriter
impl !UnwindSafe for BDFWriter
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,