10 zmq::raw_decoder_t::raw_decoder_t (
size_t bufsize_) : _allocator (bufsize_, 1)
12 const int rc = _in_progress.init ();
16 zmq::raw_decoder_t::~raw_decoder_t ()
18 const int rc = _in_progress.close ();
22 void zmq::raw_decoder_t::get_buffer (
unsigned char **
data_,
size_t *size_)
24 *
data_ = _allocator.allocate ();
25 *size_ = _allocator.size ();
28 int zmq::raw_decoder_t::decode (
const uint8_t *
data_,
33 _in_progress.init (
const_cast<unsigned char *
> (
data_), size_,
34 shared_message_memory_allocator::call_dec_ref,
35 _allocator.buffer (), _allocator.provide_content ());
39 if (_in_progress.is_zcmsg ()) {
40 _allocator.advance_content ();
41 _allocator.release ();