libaaruformat
1.0
Aaru Data Preservation Suite - Format Library
Toggle main menu visibility
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
219
typedef
struct
220
{
221
bool
compress
;
222
bool
deduplicate
;
224
uint32_t
dictionary
;
225
int8_t
table_shift
;
226
uint8_t
data_shift
;
227
uint8_t
block_alignment
;
228
bool
md5
;
229
bool
sha1
;
230
bool
sha256
;
231
bool
blake3
;
232
bool
spamsum
;
233
bool
zstd
;
234
int
zstd_level
;
235
int
num_threads
;
238
}
aaru_options
;
239
240
#endif
// LIBAARUFORMAT_OPTIONS_H
aaru_options
Parsed user-specified tunables controlling compression, deduplication, hashing and DDT geometry.
Definition
options.h:220
aaru_options::zstd
bool zstd
Use Zstandard instead of LZMA for data blocks. Default: false.
Definition
options.h:233
aaru_options::deduplicate
bool deduplicate
Storage dedup flag (DDT always exists).
Definition
options.h:222
aaru_options::zstd_level
int zstd_level
Zstandard compression level (1-22). Default: 19.
Definition
options.h:234
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:226
aaru_options::dictionary
uint32_t dictionary
LZMA dictionary size in bytes (>= 4096 recommended). Default: 33554432 (32 MiB).
Definition
options.h:224
aaru_options::compress
bool compress
Enable adaptive compression (LZMA for data blocks, FLAC for audio). Default: true.
Definition
options.h:221
aaru_options::sha256
bool sha256
Generate SHA-256 checksum (ChecksumAlgorithm::Sha256) when finalizing image.
Definition
options.h:230
aaru_options::spamsum
bool spamsum
Generate SpamSum fuzzy hash (ChecksumAlgorithm::SpamSum) if enabled.
Definition
options.h:232
aaru_options::table_shift
int8_t table_shift
DDT table shift (multi-level fan-out exponent). Default: heuristically calculated.
Definition
options.h:225
aaru_options::num_threads
int num_threads
Number of compression worker threads.
Definition
options.h:235
aaru_options::md5
bool md5
Generate MD5 checksum (ChecksumAlgorithm::Md5) when finalizing image.
Definition
options.h:228
aaru_options::blake3
bool blake3
Generate BLAKE3 checksum if supported (not stored if algorithm unavailable).
Definition
options.h:231
aaru_options::sha1
bool sha1
Generate SHA-1 checksum (ChecksumAlgorithm::Sha1) when finalizing image.
Definition
options.h:229
aaru_options::block_alignment
uint8_t block_alignment
log2 underlying block alignment (2^n bytes). Default: 9 (512 bytes).
Definition
options.h:227
include
aaruformat
structs
options.h
Generated by
1.18.0