Function setDictionarySize

Synopsis

#include <include/bitarchivecreator.hpp>

void setDictionarySize(uint32_t dictionary_size)

Description

Sets the dictionary size to be used when creating an archive.

Parameters

dictionary_size - the dictionary size desired.

Source

Lines 190-200 in src/bitarchivecreator.cpp. Line 154 in include/bitarchivecreator.hpp.

void BitArchiveCreator::setDictionarySize( uint32_t dictionary_size ) {
    if ( !isValidDictionarySize( mCompressionMethod, dictionary_size ) ) {
        throw BitException( "Invalid dictionary size for the chosen compression method", E_INVALIDARG );
    }
    if ( mCompressionMethod != BitCompressionMethod::Copy &&
            mCompressionMethod != BitCompressionMethod::Deflate &&
            mCompressionMethod != BitCompressionMethod::Deflate64 ) {
        //ignoring setting dictionary size for copy method and for methods having fixed dictionary size (deflate family)
        mDictionarySize = dictionary_size;
    }
}





Add Discussion as Guest

Log in