Skip to main content

dgen_data/
constants.rs

1// src/constants.rs
2//
3// SPDX-License-Identifier: MIT OR Apache-2.0
4
5/// Default block size for data generation (1 MiB)
6/// Smaller blocks provide better parallelization efficiency by distributing
7/// work more evenly across cores. Optimal for throughput: 256 KB - 1 MB.
8pub const BLOCK_SIZE: usize = 1024 * 1024;
9
10/// Minimum size for data generation (one block)
11pub const MIN_SIZE: usize = BLOCK_SIZE;
12
13/// Maximum back-reference distance for compression (1 KiB)
14/// Keeps compression patterns local for realistic compressor behavior
15pub const MAX_BACK_REF_DISTANCE: usize = 1024;
16
17/// Minimum run length for back-references (64 bytes)
18pub const MIN_RUN_LENGTH: usize = 64;
19
20/// Maximum run length for back-references (256 bytes)
21pub const MAX_RUN_LENGTH: usize = 256;