FACT++  1.0
int64_t Huffman::Decode ( const uint8_t *  bufin,
size_t  bufinlen,
std::vector< uint16_t > &  pbufout 
)
inline

Definition at line 401 of file huffman.h.

References Huffman::Decoder::Decode(), and i.

Referenced by Decompress(), and zfits::UncompressHUFFMAN16().

404  {
405  int64_t i = 0;
406 
407  // Read the number of data bytes this encoding represents.
408  size_t data_count = 0;
409  memcpy(&data_count, bufin, sizeof(size_t));
410  i += sizeof(size_t);
411 
412 
413  pbufout.resize(data_count);
414 
415  const Decoder decoder(bufin, i);
416 
417 #ifndef __EXCEPTIONS
418  if (i==-1)
419  return -1;
420 #endif
421 
422  const uint8_t *in_ptr =
423  decoder.Decode(bufin+i, bufin+bufinlen,
424  pbufout.data(), pbufout.data()+data_count);
425 
426 #ifndef __EXCEPTIONS
427  if (!in_ptr)
428  return -1;
429 #endif
430 
431  return in_ptr-bufin;
432  }
int i
Definition: db_dim_client.c:21

+ Here is the call graph for this function:

+ Here is the caller graph for this function: