Commit Graph

8 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
823ef17811 Update copyright years to 2026. 2025-12-23 08:21:08 +00: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
2466185ccc Add stubs to export BZIP2, LZFSE, LZMA and ZSTD. 2021-10-30 22:58:03 +01:00
08d0d5862d Add compression tests. 2021-10-21 05:02:52 +01:00
cf4f706b31 Add zstd. 2021-10-19 03:44:20 +01:00