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-2025 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
210
216 typedef struct
217{
218 bool compress;
219 bool deduplicate;
221 uint32_t dictionary;
222 int8_t table_shift;
223 uint8_t data_shift;
224 uint8_t block_alignment;
225 bool md5;
226 bool sha1;
227 bool sha256;
228 bool blake3;
229 bool spamsum;
230} aaru_options;
231
232#endif // LIBAARUFORMAT_OPTIONS_H
aaru_options
Parsed user-specified tunables controlling compression, deduplication, hashing and DDT geometry.
Definition options.h:217
aaru_options::deduplicate
bool deduplicate
Storage dedup flag (DDT always exists).
Definition options.h:219
aaru_options::data_shift
uint8_t data_shift
Global data shift: low bits encode sector offset inside a block (2^data_shift span).
Definition options.h:223
aaru_options::dictionary
uint32_t dictionary
LZMA dictionary size in bytes (>= 4096 recommended). Default: 33554432 (32 MiB).
Definition options.h:221
aaru_options::compress
bool compress
Enable adaptive compression (LZMA for data blocks, FLAC for audio). Default: true.
Definition options.h:218
aaru_options::sha256
bool sha256
Generate SHA-256 checksum (ChecksumAlgorithm::Sha256) when finalizing image.
Definition options.h:227
aaru_options::spamsum
bool spamsum
Generate SpamSum fuzzy hash (ChecksumAlgorithm::SpamSum) if enabled.
Definition options.h:229
aaru_options::table_shift
int8_t table_shift
DDT table shift (multi-level fan-out exponent). Default: heuristically calculated.
Definition options.h:222
aaru_options::md5
bool md5
Generate MD5 checksum (ChecksumAlgorithm::Md5) when finalizing image.
Definition options.h:225
aaru_options::blake3
bool blake3
Generate BLAKE3 checksum if supported (not stored if algorithm unavailable).
Definition options.h:228
aaru_options::sha1
bool sha1
Generate SHA-1 checksum (ChecksumAlgorithm::Sha1) when finalizing image.
Definition options.h:226
aaru_options::block_alignment
uint8_t block_alignment
log2 underlying block alignment (2^n bytes). Default: 9 (512 bytes).
Definition options.h:224