Kùzu C++ API
Loading...
Searching...
No Matches
kuzu::storage::IntegerBitpacking< T > Class Template Reference

#include <compression.h>

Inheritance diagram for kuzu::storage::IntegerBitpacking< T >:
kuzu::storage::CompressionAlg

Public Member Functions

 IntegerBitpacking ()=default
 
 IntegerBitpacking (const IntegerBitpacking &)=default
 
void setValuesFromUncompressed (const uint8_t *srcBuffer, common::offset_t srcOffset, uint8_t *dstBuffer, common::offset_t dstOffset, common::offset_t numValues, const CompressionMetadata &metadata, const common::NullMask *nullMask) const final
 
uint64_t compressNextPage (const uint8_t *&srcBuffer, uint64_t numValuesRemaining, uint8_t *dstBuffer, uint64_t dstBufferSize, const struct CompressionMetadata &metadata) const final
 
void decompressFromPage (const uint8_t *srcBuffer, uint64_t srcOffset, uint8_t *dstBuffer, uint64_t dstOffset, uint64_t numValues, const struct CompressionMetadata &metadata) const final
 
CompressionType getCompressionType () const override
 
- Public Member Functions inherited from kuzu::storage::CompressionAlg
virtual ~CompressionAlg ()=default
 
virtual void decompressFromPage (const uint8_t *srcBuffer, uint64_t srcOffset, uint8_t *dstBuffer, uint64_t dstOffset, uint64_t numValues, const CompressionMetadata &metadata) const =0
 

Static Public Member Functions

static BitpackInfo< T > getPackingInfo (const CompressionMetadata &metadata)
 
static uint64_t numValues (uint64_t dataSize, const BitpackInfo< T > &info)
 
static uint64_t numValues (uint64_t dataSize, const CompressionMetadata &metadata)
 
static bool canUpdateInPlace (std::span< T > value, const CompressionMetadata &metadata, const std::optional< common::NullMask > &nullMask=std::nullopt, uint64_t nullMaskOffset=0)
 

Static Public Attributes

static constexpr uint64_t CHUNK_SIZE = 32
 

Protected Member Functions

void getValues (const uint8_t *chunkStart, uint8_t pos, uint8_t *dst, uint8_t numValuesToRead, const BitpackInfo< T > &header) const
 
const uint8_t * getChunkStart (const uint8_t *buffer, uint64_t pos, uint8_t bitWidth) const
 
void packPartialChunk (const U *srcBuffer, uint8_t *dstBuffer, size_t posInDst, BitpackInfo< T > info, size_t remainingValues) const
 
void copyValuesToTempChunkWithOffset (const U *srcBuffer, U *tmpBuffer, BitpackInfo< T > info, size_t numValuesToCopy) const
 
void setPartialChunkInPlace (const uint8_t *srcBuffer, common::offset_t posInSrc, uint8_t *dstBuffer, common::offset_t posInDst, common::offset_t numValues, const BitpackInfo< T > &header) const
 

Constructor & Destructor Documentation

◆ IntegerBitpacking() [1/2]

template<IntegerBitpackingType T>
kuzu::storage::IntegerBitpacking< T >::IntegerBitpacking ( )
default

◆ IntegerBitpacking() [2/2]

template<IntegerBitpackingType T>
kuzu::storage::IntegerBitpacking< T >::IntegerBitpacking ( const IntegerBitpacking< T > & )
default

Member Function Documentation

◆ canUpdateInPlace()

template<IntegerBitpackingType T>
static bool kuzu::storage::IntegerBitpacking< T >::canUpdateInPlace ( std::span< T > value,
const CompressionMetadata & metadata,
const std::optional< common::NullMask > & nullMask = std::nullopt,
uint64_t nullMaskOffset = 0 )
static

◆ compressNextPage()

template<IntegerBitpackingType T>
uint64_t kuzu::storage::IntegerBitpacking< T >::compressNextPage ( const uint8_t *& srcBuffer,
uint64_t numValuesRemaining,
uint8_t * dstBuffer,
uint64_t dstBufferSize,
const struct CompressionMetadata & metadata ) const
finalvirtual

◆ copyValuesToTempChunkWithOffset()

template<IntegerBitpackingType T>
void kuzu::storage::IntegerBitpacking< T >::copyValuesToTempChunkWithOffset ( const U * srcBuffer,
U * tmpBuffer,
BitpackInfo< T > info,
size_t numValuesToCopy ) const
protected

◆ decompressFromPage()

template<IntegerBitpackingType T>
void kuzu::storage::IntegerBitpacking< T >::decompressFromPage ( const uint8_t * srcBuffer,
uint64_t srcOffset,
uint8_t * dstBuffer,
uint64_t dstOffset,
uint64_t numValues,
const struct CompressionMetadata & metadata ) const
final

◆ getChunkStart()

template<IntegerBitpackingType T>
const uint8_t * kuzu::storage::IntegerBitpacking< T >::getChunkStart ( const uint8_t * buffer,
uint64_t pos,
uint8_t bitWidth ) const
inlineprotected

◆ getCompressionType()

template<IntegerBitpackingType T>
CompressionType kuzu::storage::IntegerBitpacking< T >::getCompressionType ( ) const
inlineoverridevirtual

◆ getPackingInfo()

template<IntegerBitpackingType T>
static BitpackInfo< T > kuzu::storage::IntegerBitpacking< T >::getPackingInfo ( const CompressionMetadata & metadata)
static

◆ getValues()

template<IntegerBitpackingType T>
void kuzu::storage::IntegerBitpacking< T >::getValues ( const uint8_t * chunkStart,
uint8_t pos,
uint8_t * dst,
uint8_t numValuesToRead,
const BitpackInfo< T > & header ) const
protected

◆ numValues() [1/2]

template<IntegerBitpackingType T>
static uint64_t kuzu::storage::IntegerBitpacking< T >::numValues ( uint64_t dataSize,
const BitpackInfo< T > & info )
inlinestatic

◆ numValues() [2/2]

template<IntegerBitpackingType T>
static uint64_t kuzu::storage::IntegerBitpacking< T >::numValues ( uint64_t dataSize,
const CompressionMetadata & metadata )
inlinestatic

◆ packPartialChunk()

template<IntegerBitpackingType T>
void kuzu::storage::IntegerBitpacking< T >::packPartialChunk ( const U * srcBuffer,
uint8_t * dstBuffer,
size_t posInDst,
BitpackInfo< T > info,
size_t remainingValues ) const
protected

◆ setPartialChunkInPlace()

template<IntegerBitpackingType T>
void kuzu::storage::IntegerBitpacking< T >::setPartialChunkInPlace ( const uint8_t * srcBuffer,
common::offset_t posInSrc,
uint8_t * dstBuffer,
common::offset_t posInDst,
common::offset_t numValues,
const BitpackInfo< T > & header ) const
protected

◆ setValuesFromUncompressed()

template<IntegerBitpackingType T>
void kuzu::storage::IntegerBitpacking< T >::setValuesFromUncompressed ( const uint8_t * srcBuffer,
common::offset_t srcOffset,
uint8_t * dstBuffer,
common::offset_t dstOffset,
common::offset_t numValues,
const CompressionMetadata & metadata,
const common::NullMask * nullMask ) const
finalvirtual

Member Data Documentation

◆ CHUNK_SIZE

template<IntegerBitpackingType T>
uint64_t kuzu::storage::IntegerBitpacking< T >::CHUNK_SIZE = 32
staticconstexpr

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