25 Commits

Author SHA1 Message Date
81c367995f Update recovery footer size and related documentation for AaruRecoveryFooter 2026-04-12 14:17:56 +01:00
eb188f48d2 Add erasure coding structures. 2026-04-11 20:16:18 +01:00
Kevin Bortis
120174e4cd Add multi-threaded zstd compression support
Switch zstd encoder from simple API (ZSTD_compress) to advanced API
(ZSTD_CCtx + ZSTD_compress2) with configurable worker threads via
ZSTD_c_nbWorkers. Consumer controls threading through threads=N
option string parameter. Default is 1 (single-threaded, bit-identical
output to previous behavior).

- Enable ZSTD_MULTITHREAD compile definition and link pthreads
- Add num_threads field to options struct and context
- Parse threads=N in option string (clamped >= 1)
- Rewrite aaruf_zstd_encode_buffer() with num_threads parameter
- Update all call sites (write.c, close.c)
2026-03-29 12:56:19 +02:00
Kevin Bortis
6be36b6bda Add Zstandard compression support
Implements zstd as an alternative to LZMA for data block and
subchannel compression using the allocated compression IDs 4
(kCompressionZstd) and 5 (kCompressionZstdCst).

Adds zstd v1.5.7 as a bundled submodule with a static library
build including x86_64 assembly fast path for decompression.

Write path selects zstd or LZMA based on the zstd option.
Subchannel blocks use zstd+CST instead of LZMA+CST when enabled.
LZMA properties header is only written for LZMA-based compression
types, preventing format corruption in zstd-compressed images.

Activated via options string: "zstd=true;zstd_level=19".
Default remains LZMA for backwards compatibility.

Tested: SHA-256 verified lossless roundtrips across 9 disc systems
(Dreamcast, Saturn, Mega CD, PC Engine CD, Neo Geo CD, PS1, PS2 CD,
PS2 DVD) and PS1 SBI subchannel preservation with zstd+CST.
2026-03-19 08:45:07 +01:00
Rebecca Wallander
c412030a8b Use block alignment offset instead of absolute offset 2026-01-01 13:37:21 +01:00
Rebecca Wallander
86b6680e3e Add data type to datastream block 2026-01-01 13:37:20 +01:00
Rebecca Wallander
65d34b1e9a Add flux implementation 2026-01-01 13:35:43 +01:00
7f0dea2755 Repurpose two unused header fields to store biggest image sector size. 2025-12-30 20:13:39 +00:00
955789a160 Increase size of negative and overflow sectors in DDT2 to 32-bit. 2025-12-26 09:39:13 +00:00
050810c91d Update copyright year to 2026. 2025-12-23 08:23:40 +00:00
e2f3323a04 Sync specification with code. 2025-10-11 13:17:26 +01:00
61850a9520 Update DDT entry documentation to indicate 64-bit values 2025-10-11 01:34:22 +01:00
17e1c0f2bd Set DDTv2 as 64-bit and remove concept of multiple sizes of DDTs. 2025-10-10 02:39:57 +01:00
01152f5c25 Add tape media support with metadata structures and update CMake configuration 2025-10-07 04:17:04 +01:00
4491df8689 Add support for processing Aaru metadata JSON blocks 2025-10-05 05:06:30 +01:00
7313897064 Add parsing and serialization functions for Lisa family disk tags 2025-10-04 01:29:03 +01:00
5c7610c1c0 Use heuristics to setup table shift. 2025-10-02 04:40:16 +01:00
41aee42c53 Enhance documentation for various structures with detailed descriptions and formatting improvements 2025-10-01 05:35:39 +01:00
3b012797cb Implement creating AaruFormat image and writing header. 2025-08-07 15:43:35 +01:00
4b537e60a9 Define DDT2 header. 2025-08-03 20:48:30 +01:00
5de2fc8f84 Introduce index block version 3 with enhanced fault tolerance and previous block referencing 2025-08-02 01:45:27 +01:00
9a4c04b2ca Implement support for index v2. 2025-08-01 21:18:48 +01:00
2811f41734 [lib] Fix data size mismatch. 2025-08-01 02:48:16 +01:00
af6e384678 Fix typo in comment. 2025-08-01 02:42:50 +01:00
a8a18cf4d7 [lib] Split structures in separate headers. 2025-08-01 02:41:48 +01:00