Files
obitools3/src/obiblob.h

55 lines
1.6 KiB
C
Raw Normal View History

/****************************************************************************
* Obiblob header file *
****************************************************************************/
/**
* @file obiblob.h
* @author Celine Mercier
* @date November 18th 2015
* @brief Header file for handling Obi_blob structures.
*/
#ifndef OBIBLOB_H_
#define OBIBLOB_H_
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include "obitypes.h"
#define ELEMENT_SIZE_STR (8) /**< The size of an element from a value of type character string.
*/
#define ELEMENT_SIZE_SEQ_2 (2) /**< The size of an element from a value of type DNA sequence encoded on 2 bits.
*/
#define ELEMENT_SIZE_SEQ_4 (4) /**< The size of an element from a value of type DNA sequence encoded on 4 bits.
*/
/**
* @brief Blob structure.
* TODO
*/
typedef struct Obi_blob {
uint8_t element_size; /**< Size in bits of one element from the value.
*/
int32_t length_encoded_value; /**< Length in bytes of the encoded value.
*/
int32_t length_decoded_value; /**< Length in bytes of the decoded value.
*/
byte_t value[]; /**< Encoded value.
*/
} Obi_blob_t, *Obi_blob_p;
2016-04-12 16:38:47 +02:00
// TODO doc
Obi_blob_p obi_blob(byte_t* encoded_value, uint8_t element_size, int32_t length_encoded_value, int32_t length_decoded_value);
#endif /* OBIBLOB_H_ */