Files
libaaruformat/docs/spec/appendixes/compression.adoc
2026-03-29 15:16:34 +02:00

29 lines
1.1 KiB
Plaintext

[appendix]
== Compression Types
This apprendix lists all supported compression algorithms used within AaruFormat images.
NOTE: Compression method definitions may evolve over time.
For the latest and most accurate listing, refer to the `libaaruformat` source.
[cols="1,5",options="header"]
|===
|Value
|Algorithm
|0 |None
|1 |LZMA — stream prepended by 5 bytes of parameters
|2 |FLAC
|3 |LZMA after Claunia Subchannel Transform (see Appendix D) — stream prepended by 5 bytes of parameters
|4 |Zstandard (zstd) — standard zstd frame, no prefix
|5 |Zstandard after Claunia Subchannel Transform (see Appendix D) — standard zstd frame, no prefix
|===
==== Notes on Zstandard (IDs 4 and 5)
Unlike LZMA (IDs 1 and 3), Zstandard compressed payloads are stored as self-contained zstd frames.
The `cmpLength` field in the block header covers the entire compressed payload with no additional prefix bytes.
ID 5 (`ZstdCst`) applies the Claunia Subchannel Transform before compression and is restricted to blocks with data type `CdSubchannel`.
This mirrors the constraint on ID 3 (`LzmaCst`).