mc_repack_core/lib.rs
1//! MC-Repack is initially built as a CLI app, but can also be used as a library.
2//! This crate contains methods necessary to work with files that need optimizations.
3//!
4//! This crate considers that the repacked files are used in Minecraft mods. You can still use the library
5//! for other types, like Android or Gradle files.
6
7/// Minifiers for various file types.
8pub mod min;
9/// File operations used for repacking.
10pub mod fop;
11/// Error collecting for entries.
12pub mod errors;
13/// Reading and saving entries (file system or ZIP archive).
14pub mod entry;
15/// Implementations of configuration map and traits for accepting config types.
16pub mod cfg;
17/// Working on file extensions.
18pub mod ext;
19
20pub(crate) type Result_<T> = anyhow::Result<T>;
21
22/// A progress state to update information about currently optimized entry
23#[derive(Debug, Clone)]
24pub enum ProgressState {
25 /// Starts a progress with a step count
26 Start(usize),
27 /// Pushes a new step with text
28 Push(usize, std::sync::Arc<str>),
29 /// Marks a progress as finished
30 Finish
31}