Loading...
Searching...
No Matches
Streaming deserializer
MessagePack C
Collaboration diagram for Streaming deserializer:

## Classes

struct | msgpack_unpacker

## Macros

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

## Typedefs

typedef struct msgpack_unpacker | msgpack_unpacker

## Functions

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)

## Detailed Description

## Macro Definition Documentation

## MSGPACK_UNPACKER_INIT_BUFFER_SIZE

#define MSGPACK_UNPACKER_INIT_BUFFER_SIZE (64*1024)

## MSGPACK_UNPACKER_RESERVE_SIZE

#define MSGPACK_UNPACKER_RESERVE_SIZE (32*1024)

## Typedef Documentation

## msgpack_unpacker

typedef struct msgpack_unpacker msgpack_unpacker

## Function Documentation

## msgpack_unpacker_data()

MSGPACK_DLLEXPORT msgpack_object msgpack_unpacker_data | ( | msgpack_unpacker * | mpac | ) |

## msgpack_unpacker_destroy()

MSGPACK_DLLEXPORT void msgpack_unpacker_destroy | ( | msgpack_unpacker * | mpac | ) |

Destroys a streaming deserializer initialized by msgpack_unpacker_init(msgpack_unpacker*, size_t).

## msgpack_unpacker_execute()

MSGPACK_DLLEXPORT int msgpack_unpacker_execute | ( | msgpack_unpacker * | mpac | ) |

## msgpack_unpacker_free()

MSGPACK_DLLEXPORT void msgpack_unpacker_free | ( | msgpack_unpacker * | mpac | ) |

Frees a streaming deserializer created by msgpack_unpacker_new(size_t).

## msgpack_unpacker_init()

MSGPACK_DLLEXPORT bool msgpack_unpacker_init | ( | msgpack_unpacker * | mpac,
|  | size_t | initial_buffer_size
| ) |  |

Initializes a streaming deserializer.

The initialized deserializer must be destroyed by msgpack_unpacker_destroy(msgpack_unpacker*).

## msgpack_unpacker_new()

MSGPACK_DLLEXPORT msgpack_unpacker * msgpack_unpacker_new | ( | size_t | initial_buffer_size | ) |

Creates a streaming deserializer.

The created deserializer must be destroyed by msgpack_unpacker_free(msgpack_unpacker*).

## msgpack_unpacker_next()

MSGPACK_DLLEXPORT msgpack_unpack_return msgpack_unpacker_next | ( | msgpack_unpacker * | mpac,
|  | msgpack_unpacked * | pac
| ) |  |

Deserializes one object.

Returns true if it successes. Otherwise false is returned.

Parameters

  pac | pointer to an initialized msgpack_unpacked object.

## msgpack_unpacker_next_with_size()

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.

Returns true if it successes. Otherwise false is returned.

Parameters

  mpac | pointer to an initialized msgpack_unpacker object.
  result | pointer to an initialized msgpack_unpacked object.
  p_bytes | pointer to variable that will be set with the number of parsed bytes.

## msgpack_unpacker_release_zone()

MSGPACK_DLLEXPORT msgpack_zone * msgpack_unpacker_release_zone | ( | msgpack_unpacker * | mpac | ) |

## msgpack_unpacker_reset()

MSGPACK_DLLEXPORT void msgpack_unpacker_reset | ( | msgpack_unpacker * | mpac | ) |

## msgpack_unpacker_reset_zone()

MSGPACK_DLLEXPORT void msgpack_unpacker_reset_zone | ( | msgpack_unpacker * | mpac | ) |