1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
/* kc3_main
* Copyright 2022,2023,2024 kmx.io <contact@kmx.io>
*
* Permission is hereby granted to use this software granted the above
* copyright notice and this permission paragraph are included in all
* copies and substantial portions of this software.
*
* THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
* PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
/**
* @file deserialize.h
* @brief Deserialization from blob to tag.
*
* Serialization is transforming a binary blob into memory data.
*/
#ifndef LIBKC3_DESERIALIZE_H
#define LIBKC3_DESERIALIZE_H
#include "types.h"
sw deserialize_bool (s_buf *buf, bool *dest);
sw deserialize_character (s_buf *buf, character *c);
sw deserialize_list (s_buf *buf, s_list **list);
sw deserialize_tag (s_buf *buf, s_tag *tag);
sw deserialize_tuple (s_buf *buf, s_tuple *tuple);
sw deserialize_s8 (s_buf *buf, s8 *x);
sw deserialize_s16 (s_buf *buf, s16 *x);
sw deserialize_s32 (s_buf *buf, s32 *x);
sw deserialize_s64 (s_buf *buf, s64 *x);
sw deserialize_str (s_buf *buf, s_str *str);
sw deserialize_sw (s_buf *buf, sw *x);
sw deserialize_u8 (s_buf *buf, u8 *x);
sw deserialize_u16 (s_buf *buf, u16 *x);
sw deserialize_u32 (s_buf *buf, u32 *x);
sw deserialize_u64 (s_buf *buf, u64 *x);
sw deserialize_uw (s_buf *buf, uw *x);
#endif /* LIBKC3_DESERIALIZE_H */