next up previous contents index
Next: Fib elements Up: Root-element Previous: Identifiers of used database   Contents   Index


Optional part

The optional part is the last part of a root-element. It shouldn't contain important information for the presentation of multimedia object, so that it can be omitted entirely when storing. In this way, storage space can be saved.

The length of the optional part is calculated from the difference between its starting byte and the end of the root-element (for the offset see section 21.2 on page [*]).

The optional part is initiated by a 16-bit natural number $C$, which indicates the compression type of the optional part. Possible values for the compression type $C$ are listed in table 12 . The remaining optional part will be completely compressed using the specified method.


Table 12: Compression types
value $C$ description
0 no compression
1 The data is compressed in the zlib format. This is a warper (documented in RFC 1950) for a deflate stream (lossless data compression, documented in RFC 1951).


The decompressed optional part consists of a list of key, value pairs. It is initiated by a 64 bit integer $N$, which specifies the number of elements in the list. The second parameter is a 16 bit integer, which determines the coding. Possible values for encoding are listed in table 13 . In this UTF-8 should be regarded as the standard encoding and other encodings should be selected only if UTF-8 is no longer sufficient. Then follows the list with the pairs / elements.

Each list element (pair) contains two null-terminated strings in the specified encoding. The first string is the key of the element and the second is the value.


Table 13: Encoding types for strings
name value description
UTF-8 0 8-Bit Unicode Transformation Format
UTF-16 1 Universal Multiple-Octet Coded Character Set (UCS) Transformation Format for 16 Planes of Group 00
UTF-32 2 Unicode coded one character with 32 Bit


From the main-Fib-object all text from the comments (see section 21.3.5 on page [*]) are moved into the optional part. The comments also contain key ($Key$), value ($Value$) pairs. To each of these key, value pairs from the comments will be assigned a natural number $K$ (starting with 0). In the optional part a separate list entry is generated for the moved pair. In this the key of the list entry is "@" followed by the number of the comment $A$, then followed by a "@" and then the original key ($Key$) of the comment. The value of the generated list entry is equal to the value of the comment. So if the key value pair in the $A$'th comment is $(Key, Value)$, the entry in the optional part for it is $(@A@Key, Value)$.

Example: The 2. comment is: "c( "autor","ich", Obj)", the generated list entry for it in the optional part is: "( "@2@autor","ich")".

The outsourced texts should be at the end of the optional part.


next up previous contents index
Next: Fib elements Up: Root-element Previous: Identifiers of used database   Contents   Index
Betti Österholz 2013-02-13