[−][src]Struct atm::storage::batch_tar_file::BatchTarFile
Nested tar archive storage backend,
where each entry in the archive is a
gzip-compressed tar archive containing MIDI files.
Use for the largest datasets where compression, or output file size, is of the utmost
importance. Choosing a batch size (and compression level) such that each compressed tar
archive aligns with 512 bytes will ensure that no space is wasted in the top-level archive.
For example, if a batch size of 25 compresses to 515 bytes, then each entry will take 1,536
bytes (512 for header plus 1024 for data). However, if a batch compresses to 510 bytes,
then each entry will take 1024 bytes, with only 2 bytes extra. Keep in mind that higher
compression levels will reduce throughput of the program.
Implementations
impl BatchTarFile
[src]
pub fn new<P: AsRef<Path>>(
target_path: P,
batch_size: u32,
num_notes: u32,
melody_length: u32,
max_files: u32,
partition_depth: u32,
batch_compression: Option<Compression>,
batch_mode: Option<u32>
) -> Result<Self, TarArchiveError>
[src]
target_path: P,
batch_size: u32,
num_notes: u32,
melody_length: u32,
max_files: u32,
partition_depth: u32,
batch_compression: Option<Compression>,
batch_mode: Option<u32>
) -> Result<Self, TarArchiveError>
Create new BatchTarFile
instance
Trait Implementations
impl IntoInner for BatchTarFile
[src]
type Inner = BufWriter<File>
Type of inner object
fn into_inner(self) -> Result<Self::Inner, Self::Error>
[src]
impl StorageBackend for BatchTarFile
[src]
type Error = TarArchiveError
Error type for storage operations
fn append_file(
&mut self,
mfile: MIDIFile,
mode: Option<u32>
) -> Result<(), Self::Error>
[src]
&mut self,
mfile: MIDIFile,
mode: Option<u32>
) -> Result<(), Self::Error>
fn finish(&mut self) -> Result<(), Self::Error>
[src]
fn append_melody(
&mut self,
melody: MIDINoteVec,
mode: Option<u32>
) -> Result<(), Self::Error>
[src]
&mut self,
melody: MIDINoteVec,
mode: Option<u32>
) -> Result<(), Self::Error>
Auto Trait Implementations
impl RefUnwindSafe for BatchTarFile
impl Send for BatchTarFile
impl Sync for BatchTarFile
impl Unpin for BatchTarFile
impl UnwindSafe for BatchTarFile
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>,