Logo ROOT  
Reference Guide
ROOT::Experimental::Detail::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. More...
 

Public Member Functions

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

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::Detail::RNTupleCompressor::Buffer_t = std::array<unsigned char, kMAXZIPBUF>
private

Definition at line 42 of file RNTupleZip.hxx.

◆ Writer_t

using ROOT::Experimental::Detail::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/2]

ROOT::Experimental::Detail::RNTupleCompressor::RNTupleCompressor ( )
inline

Definition at line 51 of file RNTupleZip.hxx.

◆ RNTupleCompressor() [2/2]

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

Member Function Documentation

◆ GetZipBuffer()

const void * ROOT::Experimental::Detail::RNTupleCompressor::GetZipBuffer ( )
inline

Definition at line 121 of file RNTupleZip.hxx.

◆ operator()() [1/2]

size_t ROOT::Experimental::Detail::RNTupleCompressor::operator() ( 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

Definition at line 96 of file RNTupleZip.hxx.

◆ operator()() [2/2]

size_t ROOT::Experimental::Detail::RNTupleCompressor::operator() ( const void from,
size_t  nbytes,
int  compression,
Writer_t  fnWriter 
)
inline

Returns the size of the compressed data.

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

Definition at line 57 of file RNTupleZip.hxx.

◆ operator=()

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

Member Data Documentation

◆ fZipBuffer

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

Definition at line 43 of file RNTupleZip.hxx.

◆ kMaxSingleBlock

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

Definition at line 49 of file RNTupleZip.hxx.

Libraries for ROOT::Experimental::Detail::RNTupleCompressor:
[legend]

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