BCOS Home » The BCOS Project » BCOS Specifications » BCOS File Format Specifications |
BCOS File Metadata SpecificationPreliminary Draft |
Project Map |
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.
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.
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.
Offset | Size | Description |
---|---|---|
0x00000000 | 2 bytes | Size of record |
0x00000002 | 2 bytes | Tag |
0x00000004 | Varies | Record data |
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.
Value | Description |
---|---|
0x0000 | End tag (see Subsection 4.1. 0x0000 - End Tag) |
0x0001 | Copyright owner tag (see Subsection 4.2. 0x0001 - Copyright Owner Tag) |
0x0002 | Copyright tag (see Subsection 4.3. 0x0002 - Copyright Tag) |
0x0003 | Origin tag (see Subsection 4.5. 0x0004 - Origin Tag) |
0x0004 | Creation time tag (see Subsection 4.4. 0x0003 - Creation Time Tag) |
0x0005 | Author tag (see Subsection 4.6. 0x0005 - Author Tag) |
0x0006 | Keywords tag (see Subsection 4.7. 0x0006 - Keywords 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.
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".
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.
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.
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.
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".
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".