![]() |
libsxbp
v0.27
Experimental generation of 2D spiralling lines based on input binary data.
|
This compilation unit provides functions for serialising spirals to and from byte sequences (which may be stored in files or any other form). More...

Go to the source code of this file.
Data Structures | |
| struct | sxbp_serialise_result_t |
| Stores both generic and serialisation-specific error information. More... | |
Typedefs | |
| typedef enum sxbp_deserialise_diagnostic_t | sxbp_deserialise_diagnostic_t |
| Provides further error information specific to spiral de-serialisation. | |
| typedef struct sxbp_serialise_result_t | sxbp_serialise_result_t |
| Stores both generic and serialisation-specific error information. | |
Enumerations | |
| enum | sxbp_deserialise_diagnostic_t { SXBP_DESERIALISE_OK, SXBP_DESERIALISE_BAD_HEADER_SIZE, SXBP_DESERIALISE_BAD_MAGIC_NUMBER, SXBP_DESERIALISE_BAD_VERSION, SXBP_DESERIALISE_BAD_DATA_SIZE } |
| Provides further error information specific to spiral de-serialisation. More... | |
Functions | |
| sxbp_serialise_result_t | sxbp_load_spiral (sxbp_buffer_t buffer, sxbp_spiral_t *spiral) |
| De-serialises a spiral from a buffer. More... | |
| sxbp_serialise_result_t | sxbp_dump_spiral (sxbp_spiral_t spiral, sxbp_buffer_t *buffer) |
| Serialises a spiral to a buffer. More... | |
Variables | |
| const size_t | SXBP_FILE_HEADER_SIZE |
| The size of the file header in bytes. | |
| const size_t | SXBP_LINE_T_PACK_SIZE |
| The size in bytes of one line when stored in the file. | |
This compilation unit provides functions for serialising spirals to and from byte sequences (which may be stored in files or any other form).
Provides further error information specific to spiral de-serialisation.
| sxbp_serialise_result_t sxbp_dump_spiral | ( | sxbp_spiral_t | spiral, |
| sxbp_buffer_t * | buffer | ||
| ) |
Serialises a spiral to a buffer.
Writes out a binary representation of a given spiral to a buffer, which can then be stored in a file or sent across the network as required.
| spiral | The spiral which should be serialised to buffer. | |
| [out] | buffer | The data buffer to write out the spiral data to. |
| sxbp_serialise_result_t sxbp_load_spiral | ( | sxbp_buffer_t | buffer, |
| sxbp_spiral_t * | spiral | ||
| ) |
De-serialises a spiral from a buffer.
Reads in a binary representation of a spiral and populates a given spiral with the data which represents this spiral (if input data is valid).
| buffer | The data buffer to load the spiral from. | |
| [out] | spiral | The spiral to write the spiral data to. |
1.8.11