Skip to content

Commit d738422

Browse files
robUx4rcombs
andcommitted
Add zstd compression
Based on ietf-wg-cellar#423. Co-authored-by: rcombs <[email protected]>
1 parent 5498861 commit d738422

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

cellar-matroska5/matroska5_body.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,17 @@
33
All the new elements added in (#new-elements) have a `minver` attribute of "5".
44
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]
55

6+
# Zstandard Compression
7+
8+
This document adds value "4" to the `ContentCompAlgo` element ([@RFC9559, section 5.1.4.1.31.6]).
9+
It corresponds to the Zstandard (zstd) compression algorithm [@!RFC8878].
10+
11+
A compressed chunk of data in Matroska, based on the `ContentEncodingScope` ([@RFC9559, section 5.1.4.1.31.3]),
12+
consists of a Zstandard Frame, as defined in [@!RFC8878, section 3.1.1] without the 4 bytes `Magic_Number` 0xFD2FB528.
13+
14+
When the Zstandard compression algorithm is used, the `ContentCompSettings` element ([@RFC9559, section 5.1.4.1.31.7])
15+
**MAY** optionally contain a dictionary to improve compression efficiency.
16+
The dictionary Format correspond to the Dictionary Format described in [@!RFC8878, section 5] without the 4 bytes `Magic_Number` 0xEC30A437.
17+
618
# New Elements
719

cellar-matroska5/matroska5_iana.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# IANA Considerations
22

3+
## Matroska Compression Algorithms Registry Additions
4+
5+
This document adds value "4" to the "Matroska Compression Algorithms" registry.
6+
It corresponds to the Zstandard compression algorithm described in section (#zstandard-compression).
7+
38
## Matroska Codec IDs Registry Additions
49

510
This document adds the following Codec IDs to the "Matroska Codec IDs" Registry.

ebml_matroska.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,9 @@ Each block **MUST** be decompressable, even if no previous block is available in
12021202
<enum value="3" label="Header Stripping">
12031203
<documentation lang="en" purpose="definition">Octets in `ContentCompSettings` ((#contentcompsettings-element)) have been stripped from each frame.</documentation>
12041204
</enum>
1205+
<enum value="4" label="Zstandard" minver="5">
1206+
<documentation lang="en" purpose="definition">Zstandard (zstd) compression [@!RFC8878].</documentation>
1207+
</enum>
12051208
</restriction>
12061209
<extension type="stream copy" keep="1"/>
12071210
</element>

0 commit comments

Comments
 (0)