1#![cfg_attr(feature = "std", doc = "```no_run")]
19#![cfg_attr(not(feature = "std"), doc = "```ignore")]
20#![cfg_attr(not(feature = "std"), no_std)]
38#![forbid(unsafe_op_in_unsafe_fn)]
39#![warn(missing_docs, rust_2018_idioms)]
40
41extern crate alloc;
42
43#[cfg(feature = "std")]
44extern crate std;
45
46mod buffer;
47#[cfg(feature = "enc")]
48mod enc;
49mod error;
50#[cfg(feature = "filters")]
51pub mod filters;
52#[cfg(feature = "kernel-ab")]
53mod kernel_ab;
54mod lzma;
55mod lzma2;
56mod lzma_alone;
57
58#[cfg(feature = "std")]
59mod mt;
60#[cfg(feature = "std")]
61mod reader;
62#[cfg(feature = "std")]
63pub mod run;
64
65#[cfg(feature = "xz")]
66pub mod xz;
67
68#[cfg(feature = "enc")]
69pub use enc::{
70 BLOCK_SIZE_AUTO, BLOCK_SIZE_SOLID, LZMA_MATCH_LEN_MAX, LZMA_MATCH_LEN_MIN, Lzma2Encoder,
71 Lzma2PushEncoder, Lzma2Writer, LzmaEncProps, LzmaEncoder, LzmaPushEncoder, LzmaWriter,
72 MatchFinderKind, NormalizedProps, SeqInStream, SeqOutStream, SliceStream, auto_block_size,
73 encode_lzma_alone, encode_lzma2, encode_lzma2_mt,
74};
75#[cfg(all(feature = "enc", feature = "xz"))]
77pub use enc::{
78 DEFAULT_BLOCK_SIZE, XzEncoder, XzWriter, encode_xz, encode_xz_mt, encode_xz_with_filters,
79};
80pub use error::{Error, FinishMode, Progress, Status, XzErrorKind};
81pub use lzma::consts::{LZMA_PROPS_SIZE, LZMA_REQUIRED_INPUT_MAX};
82pub use lzma::{LzmaDecoder, LzmaProps};
83pub use lzma_alone::{LZMA_ALONE_HEADER_SIZE, LzmaAloneHeader};
84pub use lzma2::Lzma2Decoder;
85#[cfg(feature = "std")]
86pub use lzma2::scan::run_boundaries;
87pub use lzma2::scan::{Lzma2Run, Lzma2RunChunks, Lzma2RunScanner};
88
89#[cfg(feature = "std")]
90pub use mt::adaptive::{AdaptiveLedger, DrainStatus, Lzma2AdaptiveDecoder};
91#[cfg(all(feature = "std", feature = "crc"))]
92pub use mt::checksum;
93#[cfg(all(feature = "std", feature = "crc"))]
94pub use mt::checksum::{BlockChecks, Checksum, ChecksumPlan, Segment, SegmentCheck};
95#[cfg(feature = "std")]
96pub use mt::{Lzma2MtOptions, Lzma2ParallelDecoder, Lzma2ParallelReader, mt_memory_estimate};
97#[cfg(feature = "std")]
98pub use reader::{Lzma2Reader, LzmaReader};
99#[cfg(feature = "xz")]
100pub use xz::{XzAdaptiveDecoder, XzError, XzOptions, XzParallelReader, XzReader};
101
102#[cfg(feature = "crc")]
103pub mod crc;
104#[cfg(any(feature = "crypto", feature = "native-crypto"))]
105pub mod crypto;
106#[cfg(any(feature = "crc-host", feature = "crypto-host"))]
107pub mod hooks;
108
109pub const ASM_LOOP: bool = lzma::decode_opt::ENABLED;
113
114pub const VERSION: &str = env!("CARGO_PKG_VERSION");