Project
Loading...
Searching...
No Matches
o2::aod::native::PayloadDecompressor Class Reference

#include <Codecs.h>

Classes

struct  Codec
 

Public Member Functions

 PayloadDecompressor (std::span< const uint8_t > src, uint32_t objLen, std::string const &file, uint64_t fileOffset)
 
 ~PayloadDecompressor ()
 
 PayloadDecompressor (PayloadDecompressor const &)=delete
 
PayloadDecompressor & operator= (PayloadDecompressor const &)=delete
 
void read (uint8_t *dst, size_t n)
 
void readPrefix (uint8_t *dst, size_t n)
 
size_t produced () const
 Bytes produced so far.
 

Detailed Description

Decompresses the chunks of a ROOT compressed payload incrementally into caller-provided memory. Each read() continues where the previous one stopped, so a caller can stop at the end of the value region without producing (or holding) the rest. Only LZ4 needs scratch memory, and only when a read ends in the middle of an LZ4 chunk.

Definition at line 30 of file Codecs.h.

Constructor & Destructor Documentation

◆ PayloadDecompressor() [1/2]

o2::aod::native::PayloadDecompressor::PayloadDecompressor ( std::span< const uint8_t >  src,
uint32_t  objLen,
std::string const &  file,
uint64_t  fileOffset 
)

Definition at line 59 of file Codecs.cxx.

◆ ~PayloadDecompressor()

o2::aod::native::PayloadDecompressor::~PayloadDecompressor ( )
default

◆ PayloadDecompressor() [2/2]

o2::aod::native::PayloadDecompressor::PayloadDecompressor ( PayloadDecompressor const &  )
delete

Member Function Documentation

◆ operator=()

PayloadDecompressor & o2::aod::native::PayloadDecompressor::operator= ( PayloadDecompressor const &  )
delete

◆ produced()

size_t o2::aod::native::PayloadDecompressor::produced ( ) const
inline

Bytes produced so far.

Definition at line 46 of file Codecs.h.

◆ read()

void o2::aod::native::PayloadDecompressor::read ( uint8_t *  dst,
size_t  n 
)

Writes exactly n bytes to dst. Throws CorruptData if the payload ends first or contradicts its own headers.

Definition at line 289 of file Codecs.cxx.

◆ readPrefix()

void o2::aod::native::PayloadDecompressor::readPrefix ( uint8_t *  dst,
size_t  n 
)

Writes the first n bytes of the payload to dst, as the only read. Since the output is contiguous and stays in place, zstd decodes into it without a window buffer of its own.

Definition at line 280 of file Codecs.cxx.


The documentation for this class was generated from the following files: