BCOS Home » The BCOS Project » BCOS Specifications » BCOS File Format Specifications

BCOS File Metadata Specification

Preliminary Draft

Project Map

Contents:

1. Overview

Files may include metadata for various reasons. This metadata is independent of the file's type, and captures information that is typically useful for many different file types.

See BCOS Native File Format Specification for information on how metadata is placed into files.

2. Specification Change Policy

Any changes made in future versions of this specification are guaranteed to be backward and forward compatible.

Software designed for this version of the specification must ignore any unknown tags found in files (as these tags may have been defined in a later version of this specification).

Existing tags may never be removed from this specification. If necessary, existing tags may be marked as deprecated (but deprecated tags are still defined). Software may replace deprecated tags with equivelent (non-deprecated) tags if/when convenient.

3. Metadata Storage

Metadata is broken up into records, where each record follows the previous record. Each record consists of a tag value (that uniquely determines what the record contains), the length of the record, and then the record's data. The record's data depends on the type of tag.

Table 1. Metadata Record Format
OffsetSizeDescription
0x000000002 bytesSize of record
0x000000022 bytesTag
0x00000004VariesRecord data

4. Metadata Tags

Metadata tags and their values are defined by this specification. All undefined tag values must not be used.

Table 2. Metadata Tag Values contains a list of defined tag values.

Table 2. Metadata Tag Values
ValueDescription
0x0000End tag (see Subsection 4.1. 0x0000 - End Tag)
0x0001Copyright owner tag (see Subsection 4.2. 0x0001 - Copyright Owner Tag)
0x0002Copyright tag (see Subsection 4.3. 0x0002 - Copyright Tag)
0x0003Origin tag (see Subsection 4.5. 0x0004 - Origin Tag)
0x0004Creation time tag (see Subsection 4.4. 0x0003 - Creation Time Tag)
0x0005Author tag (see Subsection 4.6. 0x0005 - Author Tag)
0x0006Keywords tag (see Subsection 4.7. 0x0006 - Keywords Tag)

4.1. 0x0000 - End Tag

This tag is used to mark the end of the list of metadata records. Any data between the end of this tag and the end of the metadata area is unused padding.

This tag has no data, therefore the size of the record should be 4.

4.2. 0x0001 - Copyright Owner Tag

This tag contains the name of the file's copyright owner.

The record data is a plain UTF-8 string (without a zero terminator) that should not include any whitespace other than space characters; for example, "2012, Brendan Trotter".

4.3. 0x0002 - Copyright Tag

This tag contains either the name of the copyright that applies to the file or the copyright itself.

The record data is a plain UTF-8 string (without a zero terminator) that should not include any whitespace other than space characters and newline characters.

4.4. 0x0003 - Creation Time Tag

This tag contains the creation time of the file's data (which may be very different to the creation time of the file itself).

The record data is an unsigned 64-bit value representing the number of seconds that have passed since the beginning of the 1st day of January 2000 (UTC) plus 0x8000000000000000. This value includes leap seconds.

4.5. 0x0004 - Origin Tag

This tag contains some reference of where the file originally came from. It may contain the name of the publisher, the name of a server on the internet, etc.

The record data is a plain UTF-8 string (without a zero terminator) that should not include any whitespace other than space characters.

4.6. 0x0005 - Author Tag

This tag contains the name/s of people who created the file's contents.

The record data is a plain UTF-8 string (without a zero terminator) that should not include any whitespace other than space characters. If there are multiple authors the authors names are separated by semi-colons; for example, "Sally Smith;Jimmy Jones".

4.7. 0x0006 - Keywords Tag

This tag contains keywords used for content indexing and searching.

The record data is a plain UTF-8 string (without a zero terminator) that should not include any whitespace other than space characters. If there are multiple keywords the keywords are separated by semi-colons; for example, "goat;grazing;eating grass".

Generated at 04:16:59 on the 19th of May, 2019 (UTC)