pub trait Optimizable {
    // Required method
    fn optimize(&mut self, dependencies: &mut Dependencies) -> bool;
}
Expand description

This trait marks an struct (mainly structs representing decoded files) as Optimizable, meaning it can be cleaned up to reduce size and improve compatibility.

Required Methods§

source

fn optimize(&mut self, dependencies: &mut Dependencies) -> bool

This function optimizes the provided struct to reduce its size and improve compatibility.

It returns if the struct has been left in an state where it can be safetly deleted.

Implementations on Foreign Types§

source§

impl Optimizable for DB

source§

fn optimize(&mut self, dependencies: &mut Dependencies) -> bool

This function optimizes the provided DB file in order to make it smaller and more compatible.

Specifically, it performs the following optimizations:

  • Removal of duplicated entries.
  • Removal of ITM (Identical To Master) entries.
  • Removal of ITNR (Identical To New Row) entries.

It returns if the DB is empty, meaning it can be safetly deleted.

source§

impl Optimizable for Loc

source§

fn optimize(&mut self, dependencies: &mut Dependencies) -> bool

This function optimizes the provided Loc file in order to make it smaller and more compatible.

Specifically, it performs the following optimizations:

  • Removal of duplicated entries.
  • Removal of ITM (Identical To Master) entries.
  • Removal of ITNR (Identical To New Row) entries.

It returns if the Loc is empty, meaning it can be safetly deleted.

Implementors§