Esta página ainda não foi traduzida e é apresentada em inglês.
File Header
The file header, encoded using the CBOR format, contains critical metadata about the RAE file and its content. The RaeBinaryFile is the root record for the RAE file format in its binary representation. It starts directly after the terminator byte of the magic string (see File Identification) and extends to the end of the file.
Properties
- Format (required):
Identifies the data format contained within the file. For now, only"MeasurementComponentMetaTuple[]"is supported — an array of MeasurementComponentMetaTuple records. - Version (required):
Indicates the version of the file format. The current version is1. - Compression (optional):
Specifies the compression algorithm used for theDatabyte array. If not set, it defaults to"none". Currently, only"gzip"is supported. - EncryptionAlgorithm (optional):
Specifies the encryption algorithm applied to the data (if any). Encryption is not implemented in the current version; files are written with"none". - HashAlgorithm (optional):
Describes the hashing algorithm used to validate data integrity. Currently"sha256". - Hash (optional):
A hash string used for data integrity checks. It is calculated over theDatabyte array as stored in the file (i.e. after compression), using the algorithm specified inHashAlgorithm. - DataContainer (required):
Indicates the encoding of the payload insideDataafter decompression. Currently, this is always"cbor". - DataSize (required):
The size of theDatabyte array in bytes. - Data (required):
The actual measurement data stored as a byte array. The data is compressed using the specified compression algorithm (or left uncompressed ifCompression = "none") and contains a CBOR-encoded container matching theFormat.
In the CBOR encoding, the map keys are the property names in lowerCamelCase:
format,version,compression,encryptionAlgorithm,hashAlgorithm,hash,dataContainer,dataSize,data. TheDatabyte array is stored as a CBOR byte string.
Declaration
public record RaeBinaryFile
{
public required string Format { get; set; }
public required int Version { get; set; }
public string? Compression { get; set; }
public string? EncryptionAlgorithm { get; set; }
public string? HashAlgorithm { get; set; }
public string? Hash { get; set; }
public required string DataContainer { get; set; }
public required int DataSize { get; set; }
public required byte[] Data { get; set; }
}