49 Commits

Author SHA1 Message Date
adecbc7c7f Unify external API signatures across all buffer transforms
Every exported buffer transform now has the same shape:

    int32_t AARU_xxx(const uint8_t *src_buffer, size_t src_size,
                     uint8_t *dst_buffer, size_t *dst_size, ...extras);

On entry *dst_size is the capacity of dst_buffer; on success it holds the
number of bytes written. The return value is 0 (AARU_ERROR_NONE) on success
and non-zero on error, either an AARU_ERROR_* constant or the underlying
library's own error code when it is propagated.

Changes by category:

- Parameter reorder only: all AARU_zip_*, AARU_stuffit*, AARU_dd_*,
  AARU_cpt_*, AARU_lzo_*, AARU_xz_*, AARU_lzma2_*, AARU_kencode_*,
  AARU_apple_lzh_* and ace_decompress_*.
- Byte count return replaced by an out-parameter plus a status code:
  AARU_adc_*, AARU_apple_rle_*, AARU_lz4_*, AARU_lzip_*, AARU_lzfse_*,
  AARU_lzvn_*, AARU_zstd_* and AARU_flac_*. Their algorithm bodies are kept
  as static internals behind a thin exported wrapper.
- Type normalisation: bzip2 uint32_t* -> size_t*, zstd void* -> uint8_t*,
  ZIP PPMd size_t -> size_t*, and int/unsigned char -> int32_t/uint8_t
  throughout the header.
- AARU_lzma_decode_buffer no longer takes src_size as an in/out pointer; the
  consumed length is tracked internally.
- Already conforming decompressors (arc_*, pak_*, ha_*, lha_*, larc_*,
  pmarc_*, arj*, rar*, lh5_decompress) only had their declarations
  normalised.

The streaming LZD context API and AARU_get_acn_version are left alone, as
they are not buffer transforms.

Tests updated to the new call convention; all 78 pass.
2026-08-31 12:26:05 +01:00
5c39fda7be Add KenCode decompressor implementation and tests 2026-04-20 21:57:52 +01:00
16dd2ce90f Add ShrinkWrap 3 SIT2 decompression support and tests 2026-04-20 14:43:39 +01:00
d9c3129e6a Add Apple LZH decompression support and corresponding tests
- Implemented Apple LZH decompression in `apple_lzh.c` and declared it in `apple_lzh.h`.
- Updated `CMakeLists.txt` to include new source files for the Apple LZH decompression.
- Added test cases for Apple LZH decompression in `tests/dart/dart.cpp` to verify functionality against known compressed files.
- Copied necessary test data files for both fast and best compression modes into the test data directory.
- Updated `library.h` to declare the new decompression function.
2026-04-19 21:02:42 +01:00
ca0da465e8 Remove obsolete StuffIt test binary file 2026-04-17 01:27:06 +01:00
ba39191e07 Add StuffIt decompression support
- Implemented range coder in `rangecoder.c` and `rangecoder.h` for efficient encoding/decoding.
- Added RLE90 decoding in `rle90.c` for handling StuffIt method 1.
- Introduced `stuffit.h` and `stuffit_internal.h` to define compression methods and internal structures.
- Implemented x86 address transformation in `x86.c` for StuffIt X preprocessing.
- Updated CMakeLists to include new test data files for various StuffIt methods.
- Created comprehensive tests in `stuffit.cpp` for validating decompression of multiple StuffIt formats.
- Added binary test data for StuffIt methods including compress, method 13, arsenic, and StuffIt X variants.
2026-04-17 01:19:44 +01:00
7a6c85b44f Add DiskDoubler decompression support
- Introduced dd.h header file with function declarations for various DiskDoubler decompression methods including ADn, DDn, Method 2, Stac LZS, Compact Pro, and LZW.
- Implemented wrapper functions in library.c to expose DiskDoubler decompression methods to the Aaru API.
- Updated library.h to declare the new DiskDoubler functions.
- Added test cases for DiskDoubler decompression methods in dd.cpp, covering ADn and DDn methods with corresponding binary test data.
- Included necessary test data files for ADn and DDn methods in the tests/data directory.
2026-04-16 23:19:47 +01:00
e3e6a874fd Add CompactPro compression algorithms. 2026-04-16 22:07:24 +01:00
bbeff6f3c6 Enhance RAR decompression logic to handle filter boundaries and improve output management 2026-04-16 13:53:58 +01:00
1228eea822 Add RAR compression algorithms
- Introduced a new header file `vm.h` for the RAR 3.0 virtual machine, defining its architecture, instruction set, and API.
- Implemented the core functionality for executing RAR decompression filters.
- Added test cases for RAR formats 1.5, 2.0, 3.0, and 5.0, verifying decompression and CRC checks.
- Included necessary binary test data files for RAR formats in the test directory.
- Updated CMake configuration to include new test files and data.
2026-04-15 02:59:40 +01:00
12a4d684f5 Add support for various ZIP compression methods
- Implement Deflate64 decompression in zip/deflate64.h and zip/deflate64.c.
- Add ZIP Implode decompression functionality in zip/implode.h and zip/implode.c.
- Introduce ZIP Reduce decompression in zip/reduce.h and zip/reduce.c.
- Implement ZIP Shrink decompression in zip/shrink.h and zip/shrink.c.
- Create a unified ZIP interface in zip/zip.h and zip/zip.c to handle multiple compression methods including PPMd, WavPack, and WinZip JPEG.
- Ensure all new functions adhere to the Aaru Data Preservation Suite licensing and documentation standards.
2026-04-15 00:52:22 +01:00
61a8031402 Add ARJ and ARJZ decompression methods and corresponding tests
- Introduced arjz.h header file with function declaration for buffer decompression.
- Updated library.h to include ARJ and ARJZ decompression method declarations.
- Added test cases for ARJ decompression methods (Method 1 to Method 4) in arj.cpp.
- Implemented test cases for ARJZ decompression methods in arjz.cpp, including default and custom extended DEFLATE.
- Copied necessary binary test data files for ARJ and ARJZ methods into the tests/data directory.
2026-04-14 23:33:08 +01:00
d5c1cee932 Add ACE decompression support for v1 and v2 formats
- Implemented ace_decompress_v2 and ace_decompress_v20_block functions for handling ACE v2 (blocked) decompression.
- Added ace_decompress_lz77 function for ACE v1 (LZ77) decompression.
- Updated library.h to declare new decompression functions.
- Created unit tests for ACE v1 and v2 decompression, validating output against expected CRC32 checksums.
- Included necessary binary test data for ACE v1 and v2 formats.
- Refactored library.c to improve include order and reduce redundancy in function definitions.
2026-04-14 21:49:37 +01:00
882b775f71 Add LHA, LHARC, LARC and PMARC decompression support for various algorithms
- Implemented LZSS compression in lha/lzss.c and lha/lzss.h.
- Added PMarc decompression functionality in lha/pmarc1.c and lha/pmarc1.h.
- Updated library.h to include declarations for new decompression functions.
- Enhanced tests to cover LHA decompression for LH1, LH6, and PMarc formats.
- Added test helpers for loading LHA payloads and validating decompression results.
- Included sample data files for testing LHA and PMarc decompression.
2026-04-14 20:23:16 +01:00
99bea33209 Add xz compression and decompression tests with CMake integration 2026-02-08 21:31:24 +00:00
ed45dfce4d Merge pull request #1 from FakeShemp/fakeshemp/lz4
Add LZ4
2025-12-26 16:12:25 +00:00
Rebecca Wallander
5d01a00327 Add LZ4 2025-12-26 14:09:26 +01:00
Rebecca Wallander
3510b57bc8 Wrong size allocated. 2025-12-26 12:28:52 +01:00
a85daf436e Add missing HA test files. 2025-12-26 10:30:41 +00:00
823ef17811 Update copyright years to 2026. 2025-12-23 08:21:08 +00:00
f2dba8922a Fix checked version of googletest. 2025-12-21 20:38:25 +00:00
ce378021ba Implement HA's ASC and HSC algorithms. 2025-09-06 18:59:18 +01:00
4df2934506 Add AMG compressed sample. 2025-09-06 17:13:37 +01:00
54410bf59e Add PAK methods 10 (crush) and 11 (distill). 2025-09-02 13:01:16 +01:00
1323bba72f Add ARC methods 8 (Crunch) and 9 (squash), 12-bit and 13-bit Dynamic LZW. 2025-09-02 10:19:51 +01:00
a39e6abb97 Add ARC methods 5, 6 and 7, LZW with different hash tables, with and without non-repeat packing, aka crunch. 2025-09-02 03:52:35 +01:00
afc6f3e2bc Add ARC method 4 Huffman squeezing decompression implementation and tests 2025-09-02 03:06:31 +01:00
bfb9a6b524 Add ARC non-repeat packing decompression implementation and tests. 2025-09-01 23:30:57 +01:00
057d0c0242 Add support for decompressing Lempel-Ziv-Huffman, LH5 variant. 2025-08-26 01:02:37 +01:00
0068268c65 Add LZD testfile. 2025-08-23 22:55:10 +01:00
6637fb486f Implement LZD from ZOO (method 1), heavily modified to support .NET straming mechanisms. 2025-08-23 22:07:11 +01:00
b285754ad4 Update copyright year. 2024-12-19 15:26:07 +00:00
123879fc7c General refactor and cleanup. 2024-04-30 15:37:29 +01:00
aa350e110c Update copyright year. 2022-12-02 10:59:00 +00:00
a53d17cc14 Fix FLAC API with missing LPC order. 2021-11-06 19:43:04 +00:00
2466185ccc Add stubs to export BZIP2, LZFSE, LZMA and ZSTD. 2021-10-30 22:58:03 +01:00
37e8a8b4c7 Namespace exported symbols. 2021-10-30 21:58:10 +01:00
1af5ae7d9f Fix formatting. 2021-10-21 05:25:11 +01:00
08d0d5862d Add compression tests. 2021-10-21 05:02:52 +01:00
a6fce35a2c Add FLAC. 2021-10-20 00:44:34 +01:00
81b9fe7704 Add LZMA SDK. 2021-10-19 21:27:23 +01:00
cf4f706b31 Add zstd. 2021-10-19 03:44:20 +01:00
e45cf28dee Add LZFSE. 2021-10-19 02:56:20 +01:00
e6bd313555 Add lzip. 2021-10-18 02:44:57 +01:00
2ea79225cc Add libbz2. 2021-10-18 00:17:15 +01:00
b12b12f8f4 Add Apple ADC algorithm. 2021-10-17 04:45:11 +01:00
722175d2ae Change Apple RLE algorithm for a faster version. 2021-10-17 01:11:43 +01:00
1a9a76b2d3 Add Apple RLE algorithm. 2021-10-14 04:37:48 +01:00
05dbda33ab Initial commit. 2021-10-14 04:01:16 +01:00