libaaruformat 1.0
Aaru Data Preservation Suite - Format Library
Loading...
Searching...
No Matches
options.h
Go to the documentation of this file.
1/*
2 * This file is part of the Aaru Data Preservation Suite.
3 * Copyright (c) 2019-2026 Natalia Portillo.
4 *
5 * This library is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as
7 * published by the Free Software Foundation; either version 2.1 of the
8 * License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef LIBAARUFORMAT_OPTIONS_H
20#define LIBAARUFORMAT_OPTIONS_H
21
22#include <stdbool.h>
23#include <stdint.h>
24
213
219typedef struct
220{
221 bool compress;
224 uint32_t dictionary;
225 int8_t table_shift;
226 uint8_t data_shift;
228 bool md5;
229 bool sha1;
230 bool sha256;
231 bool blake3;
232 bool spamsum;
233 bool zstd;
239
240#endif // LIBAARUFORMAT_OPTIONS_H
Parsed user-specified tunables controlling compression, deduplication, hashing and DDT geometry.
Definition options.h:220
bool zstd
Use Zstandard instead of LZMA for data blocks. Default: false.
Definition options.h:233
bool deduplicate
Storage dedup flag (DDT always exists).
Definition options.h:222
int zstd_level
Zstandard compression level (1-22). Default: 19.
Definition options.h:234
uint8_t data_shift
Global data shift: low bits encode sector offset inside a block (2^data_shift span).
Definition options.h:226
uint32_t dictionary
LZMA dictionary size in bytes (>= 4096 recommended). Default: 33554432 (32 MiB).
Definition options.h:224
bool compress
Enable adaptive compression (LZMA for data blocks, FLAC for audio). Default: true.
Definition options.h:221
bool sha256
Generate SHA-256 checksum (ChecksumAlgorithm::Sha256) when finalizing image.
Definition options.h:230
bool spamsum
Generate SpamSum fuzzy hash (ChecksumAlgorithm::SpamSum) if enabled.
Definition options.h:232
int8_t table_shift
DDT table shift (multi-level fan-out exponent). Default: heuristically calculated.
Definition options.h:225
int num_threads
Number of compression worker threads.
Definition options.h:235
bool md5
Generate MD5 checksum (ChecksumAlgorithm::Md5) when finalizing image.
Definition options.h:228
bool blake3
Generate BLAKE3 checksum if supported (not stored if algorithm unavailable).
Definition options.h:231
bool sha1
Generate SHA-1 checksum (ChecksumAlgorithm::Sha1) when finalizing image.
Definition options.h:229
uint8_t block_alignment
log2 underlying block alignment (2^n bytes). Default: 9 (512 bytes).
Definition options.h:227