![]() |
Project
|
#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. | |
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.
| 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.
|
default |
|
delete |
|
delete |
|
inline |
| 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.
| 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.