diff --git a/cellar-matroska5/matroska5_body.md b/cellar-matroska5/matroska5_body.md index f9c1e81f..d6eea8ad 100644 --- a/cellar-matroska5/matroska5_body.md +++ b/cellar-matroska5/matroska5_body.md @@ -3,5 +3,17 @@ All the new elements added in (#new-elements) have a `minver` attribute of "5". If they are present in a Matroska file the EBML Header **MUST** have a `DocTypeVersion` of "5" or more, see [@!RFC8794, section 11.2.7] +# Zstandard Compression + +This document adds value "4" to the `ContentCompAlgo` element ([@RFC9559, section 5.1.4.1.31.6]). +It corresponds to the Zstandard (zstd) compression algorithm [@!RFC8878]. + +A compressed chunk of data in Matroska, based on the `ContentEncodingScope` ([@RFC9559, section 5.1.4.1.31.3]), +consists of a Zstandard Frame, as defined in [@!RFC8878, section 3.1.1] without the 4 bytes `Magic_Number` 0xFD2FB528. + +When the Zstandard compression algorithm is used, the `ContentCompSettings` element ([@RFC9559, section 5.1.4.1.31.7]) +**MAY** optionally contain a dictionary to improve compression efficiency. +The dictionary Format correspond to the Dictionary Format described in [@!RFC8878, section 5] without the 4 bytes `Magic_Number` 0xEC30A437. + # New Elements diff --git a/cellar-matroska5/matroska5_iana.md b/cellar-matroska5/matroska5_iana.md index 828fca86..4276a9e0 100644 --- a/cellar-matroska5/matroska5_iana.md +++ b/cellar-matroska5/matroska5_iana.md @@ -1,5 +1,10 @@ # IANA Considerations +## Matroska Compression Algorithms Registry Additions + +This document adds value "4" to the "Matroska Compression Algorithms" registry. +It corresponds to the Zstandard compression algorithm described in section (#zstandard-compression). + ## Matroska Codec IDs Registry Additions This document adds the following Codec IDs to the "Matroska Codec IDs" Registry. diff --git a/ebml_matroska.xml b/ebml_matroska.xml index 84fb1d6a..a2107460 100644 --- a/ebml_matroska.xml +++ b/ebml_matroska.xml @@ -1202,6 +1202,9 @@ Each block **MUST** be decompressable, even if no previous block is available in Octets in `ContentCompSettings` ((#contentcompsettings-element)) have been stripped from each frame. + + Zstandard (zstd) compression [@!RFC8878]. +