Skip to main content

harness_read/
constants.rs

1pub const DEFAULT_LIMIT: usize = 2000;
2pub const MAX_LINE_LENGTH: usize = 2000;
3pub const MAX_BYTES: usize = 50 * 1024;
4pub const MAX_FILE_SIZE: u64 = 5 * 1024 * 1024;
5pub const BINARY_SAMPLE_BYTES: usize = 4096;
6pub const FUZZY_SUGGESTION_LIMIT: usize = 3;
7
8pub fn max_line_suffix() -> String {
9    format!("... (line truncated to {} chars)", MAX_LINE_LENGTH)
10}
11
12pub fn max_bytes_label() -> String {
13    format!("{} KB", MAX_BYTES / 1024)
14}
15
16pub const BINARY_EXTENSIONS: &[&str] = &[
17    ".zip", ".tar", ".gz", ".exe", ".dll", ".so", ".class", ".jar", ".war", ".7z", ".doc",
18    ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".odt", ".ods", ".odp", ".bin", ".dat", ".obj",
19    ".o", ".a", ".lib", ".wasm", ".pyc", ".pyo",
20];