Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::Internal::RNTupleCompressor Class Reference

Helper class to compress data blocks in the ROOT compression frame format.

Definition at line 40 of file RNTupleZip.hxx.

Public Types

using Writer_t = std::function< void(const void *buffer, size_t nbytes, size_t offset)>
 Data might be overwritten, if a zipped block in the middle of a large input data stream turns out to be uncompressible.
 

Public Member Functions

 RNTupleCompressor ()
 
 RNTupleCompressor (const RNTupleCompressor &other)=delete
 
 RNTupleCompressor (RNTupleCompressor &&other)=default
 
void * GetZipBuffer ()
 
RNTupleCompressoroperator= (const RNTupleCompressor &other)=delete
 
RNTupleCompressoroperator= (RNTupleCompressor &&other)=default
 
size_t Zip (const void *from, size_t nbytes, int compression)
 Returns the size of the compressed data block.
 
size_t Zip (const void *from, size_t nbytes, int compression, Writer_t fnWriter)
 Returns the size of the compressed data.
 

Static Public Member Functions

static Writer_t MakeMemCopyWriter (unsigned char *dest)
 
static std::size_t Zip (const void *from, std::size_t nbytes, int compression, void *to)
 Returns the size of the compressed data, written into the provided output buffer.
 

Static Public Attributes

static constexpr size_t kMaxSingleBlock = kMAXZIPBUF
 

Private Types

using Buffer_t = std::array< unsigned char, kMAXZIPBUF >
 

Private Attributes

std::unique_ptr< Buffer_tfZipBuffer
 

#include <ROOT/RNTupleZip.hxx>

Member Typedef Documentation

◆ Buffer_t

using ROOT::Experimental::Internal::RNTupleCompressor::Buffer_t = std::array<unsigned char, kMAXZIPBUF>
private

Definition at line 42 of file RNTupleZip.hxx.

◆ Writer_t

using ROOT::Experimental::Internal::RNTupleCompressor::Writer_t = std::function<void(const void *buffer, size_t nbytes, size_t offset)>

Data might be overwritten, if a zipped block in the middle of a large input data stream turns out to be uncompressible.

Definition at line 48 of file RNTupleZip.hxx.

Constructor & Destructor Documentation

◆ RNTupleCompressor() [1/3]

ROOT::Experimental::Internal::RNTupleCompressor::RNTupleCompressor ( )
inline

Definition at line 55 of file RNTupleZip.hxx.

◆ RNTupleCompressor() [2/3]

ROOT::Experimental::Internal::RNTupleCompressor::RNTupleCompressor ( const RNTupleCompressor other)
delete

◆ RNTupleCompressor() [3/3]

ROOT::Experimental::Internal::RNTupleCompressor::RNTupleCompressor ( RNTupleCompressor &&  other)
default

Member Function Documentation

◆ GetZipBuffer()

void * ROOT::Experimental::Internal::RNTupleCompressor::GetZipBuffer ( )
inline

Definition at line 165 of file RNTupleZip.hxx.

◆ MakeMemCopyWriter()

static Writer_t ROOT::Experimental::Internal::RNTupleCompressor::MakeMemCopyWriter ( unsigned char *  dest)
inlinestatic

Definition at line 49 of file RNTupleZip.hxx.

◆ operator=() [1/2]

RNTupleCompressor & ROOT::Experimental::Internal::RNTupleCompressor::operator= ( const RNTupleCompressor other)
delete

◆ operator=() [2/2]

RNTupleCompressor & ROOT::Experimental::Internal::RNTupleCompressor::operator= ( RNTupleCompressor &&  other)
default

◆ Zip() [1/3]

size_t ROOT::Experimental::Internal::RNTupleCompressor::Zip ( const void *  from,
size_t  nbytes,
int  compression 
)
inline

Returns the size of the compressed data block.

The data is written into the zip buffer. This works only for small input buffer up to 16MB (kMAXZIPBUF)

Definition at line 102 of file RNTupleZip.hxx.

◆ Zip() [2/3]

size_t ROOT::Experimental::Internal::RNTupleCompressor::Zip ( const void *  from,
size_t  nbytes,
int  compression,
Writer_t  fnWriter 
)
inline

Returns the size of the compressed data.

Data is compressed in 16MB (kMAXZIPBUF) blocks and written piecewise using the provided writer

Definition at line 63 of file RNTupleZip.hxx.

◆ Zip() [3/3]

static std::size_t ROOT::Experimental::Internal::RNTupleCompressor::Zip ( const void *  from,
std::size_t  nbytes,
int  compression,
void *  to 
)
inlinestatic

Returns the size of the compressed data, written into the provided output buffer.

Definition at line 128 of file RNTupleZip.hxx.

Member Data Documentation

◆ fZipBuffer

std::unique_ptr<Buffer_t> ROOT::Experimental::Internal::RNTupleCompressor::fZipBuffer
private

Definition at line 43 of file RNTupleZip.hxx.

◆ kMaxSingleBlock

constexpr size_t ROOT::Experimental::Internal::RNTupleCompressor::kMaxSingleBlock = kMAXZIPBUF
staticconstexpr

Definition at line 53 of file RNTupleZip.hxx.

Libraries for ROOT::Experimental::Internal::RNTupleCompressor:

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