MCPcopy Create free account
hub / github.com/catboost/catboost / decode

Method decode

contrib/libs/zeromq/src/raw_decoder.cpp:28–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28int zmq::raw_decoder_t::decode (const uint8_t *data_,
29 size_t size_,
30 size_t &bytes_used_)
31{
32 const int rc =
33 _in_progress.init (const_cast<unsigned char *> (data_), size_,
34 shared_message_memory_allocator::call_dec_ref,
35 _allocator.buffer (), _allocator.provide_content ());
36
37 // if the buffer serves as memory for a zero-copy message, release it
38 // and allocate a new buffer in get_buffer for the next decode
39 if (_in_progress.is_zcmsg ()) {
40 _allocator.advance_content ();
41 _allocator.release ();
42 }
43
44 errno_assert (rc != -1);
45 bytes_used_ = size_;
46 return 1;
47}

Callers

nothing calls this directly

Calls 6

bufferMethod · 0.80
provide_contentMethod · 0.80
is_zcmsgMethod · 0.80
advance_contentMethod · 0.80
initMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected