base_d/prelude.rs
1//! Convenient re-exports for common usage.
2//!
3//! This module provides a single import for the most commonly used types
4//! and functions in base-d.
5//!
6//! # Example
7//!
8//! ```
9//! use base_d::prelude::*;
10//!
11//! let registry = DictionaryRegistry::load_default().unwrap();
12//! let result = hash_encode(b"Hello", ®istry).unwrap();
13//! println!("{}", result.encoded);
14//! ```
15
16pub use crate::{
17 CompressionAlgorithm,
18
19 DecodeError,
20 Dictionary,
21 // Detection
22 DictionaryDetector,
23 DictionaryMatch,
24
25 DictionaryRegistry,
26
27 // Config
28 EncodingMode,
29 // Feature types
30 HashAlgorithm,
31 compress,
32 // Convenience functions
33 convenience::{
34 CompressEncodeResult, HashEncodeResult, compress_encode, compress_encode_with, hash_encode,
35 hash_encode_with,
36 },
37
38 decode,
39 decompress,
40 detect_dictionary,
41
42 // Core encoding/decoding
43 encode,
44 // Lower-level functions if needed
45 hash,
46};