[Specification] Add Claunia Subchannel Transform appendix

This commit is contained in:
2025-07-31 21:38:20 +01:00
parent 982d61b3fa
commit a3c4b18d1d
2 changed files with 24 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
[appendix]
== Claunia Subchannel Transform
The subchannel structure in CompactDisc media—and compatible formats—consists of eight interleaved components: `P`, `Q`, `R`, `S`, `T`, `U`, `V`, `W`.
In their raw form, each byte read from the disc contains a single bit from each of these elements, resulting in a highly interleaved data stream.
This structure, while efficient for playback, poses challenges for compression algorithms such as LZMA, which struggle with apparent randomness and achieve poor compression ratios (typically less than 2%).
To address this, the **Claunia Subchannel Transform** is applied:
- All bits are **de-interleaved** so that each subchannel (`P` through `W`) is formed into distinct byte streams.
- All `P` bytes from all sectors are written sequentially, followed by all `Q` bytes, then `R`, and so on up to `W`.
While this transform temporarily increases memory usage (approximately 32MiB additional), the benefits are substantial:
- Compression speed improves up to **10× faster**
- Compression gains reach approximately **96%**, particularly on media lacking `R``W` subchannel data—as is the case with ~99% of discs.
NOTE: For implementation specifics or updates to this method, refer to the authoritative `libaaruformat` source.

View File

@@ -130,4 +130,8 @@ include::appendixes/data_types.adoc[]
<<<
include::appendixes/compression.adoc[]
include::appendixes/compression.adoc[]
<<<
include::appendixes/cst.adoc[]