Loading...
Searching...
No Matches
unpack.h File Reference
`#include "zone.h"`
`#include "object.h"`
`#include <string.h>`
Include dependency graph for unpack.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes

struct | msgpack_unpacked
struct | msgpack_unpacker

## Macros

#define | MSGPACK_UNPACKER_INIT_BUFFER_SIZE (64*1024)
#define | MSGPACK_UNPACKER_RESERVE_SIZE (32*1024)

## Typedefs

typedef struct msgpack_unpacked | msgpack_unpacked
typedef struct msgpack_unpacker | msgpack_unpacker

## Enumerations

enum | msgpack_unpack_return { MSGPACK_UNPACK_SUCCESS = 2 , MSGPACK_UNPACK_EXTRA_BYTES = 1 , MSGPACK_UNPACK_CONTINUE = 0 , MSGPACK_UNPACK_PARSE_ERROR = -1 , MSGPACK_UNPACK_NOMEM_ERROR = -2 }

## Functions

MSGPACK_DLLEXPORT msgpack_unpack_return | msgpack_unpack_next (msgpack_unpacked *result, const char *data, size_t len, size_t *off)
MSGPACK_DLLEXPORT bool | msgpack_unpacker_init (msgpack_unpacker *mpac, size_t initial_buffer_size)
| Initializes a streaming deserializer.
MSGPACK_DLLEXPORT void | msgpack_unpacker_destroy (msgpack_unpacker *mpac)
| Destroys a streaming deserializer initialized by msgpack_unpacker_init(msgpack_unpacker*, size_t).
MSGPACK_DLLEXPORT msgpack_unpacker * | msgpack_unpacker_new (size_t initial_buffer_size)
| Creates a streaming deserializer.
MSGPACK_DLLEXPORT void | msgpack_unpacker_free (msgpack_unpacker *mpac)
| Frees a streaming deserializer created by msgpack_unpacker_new(size_t).
MSGPACK_DLLEXPORT msgpack_unpack_return | msgpack_unpacker_next (msgpack_unpacker *mpac, msgpack_unpacked *pac)
| Deserializes one object.
MSGPACK_DLLEXPORT msgpack_unpack_return | msgpack_unpacker_next_with_size (msgpack_unpacker *mpac, msgpack_unpacked *result, size_t *p_bytes)
| Deserializes one object and set the number of parsed bytes involved.
MSGPACK_DLLEXPORT int | msgpack_unpacker_execute (msgpack_unpacker *mpac)
MSGPACK_DLLEXPORT msgpack_object | msgpack_unpacker_data (msgpack_unpacker *mpac)
MSGPACK_DLLEXPORT msgpack_zone * | msgpack_unpacker_release_zone (msgpack_unpacker *mpac)
MSGPACK_DLLEXPORT void | msgpack_unpacker_reset_zone (msgpack_unpacker *mpac)
MSGPACK_DLLEXPORT void | msgpack_unpacker_reset (msgpack_unpacker *mpac)
MSGPACK_DLLEXPORT msgpack_unpack_return | msgpack_unpack (const char *data, size_t len, size_t *off, msgpack_zone *result_zone, msgpack_object *result)
MSGPACK_DLLEXPORT bool | msgpack_unpacker_flush_zone (msgpack_unpacker *mpac)
MSGPACK_DLLEXPORT bool | msgpack_unpacker_expand_buffer (msgpack_unpacker *mpac, size_t size)

## Function Documentation

## msgpack_unpack()

MSGPACK_DLLEXPORT msgpack_unpack_return msgpack_unpack | ( | const char * | data,
|  | size_t | len,
|  | size_t * | off,
|  | msgpack_zone * | result_zone,
|  | msgpack_object * | result
| ) |  |

## msgpack_unpacker_expand_buffer()

MSGPACK_DLLEXPORT bool msgpack_unpacker_expand_buffer | ( | msgpack_unpacker * | mpac,
|  | size_t | size
| ) |  |

## msgpack_unpacker_flush_zone()

MSGPACK_DLLEXPORT bool msgpack_unpacker_flush_zone | ( | msgpack_unpacker * | mpac | ) |