16 #ifndef odc_core_CodecOptimizer_H
17 #define odc_core_CodecOptimizer_H
33 template <
typename DATASTREAM>
39 template <
typename ByteOrder>
46 double min = col.
min();
47 double max = col.
max();
59 ASSERT(codec_long != 0);
62 codec = col.
hasMissing() ?
"real_constant_or_missing" :
"constant";
67 codec =
"short_real2";
83 codec = col.
hasMissing() ?
"real_constant_or_missing" :
"constant";
98 codec =
"constant_string";
100 codec =
"int8_string";
102 codec =
"int16_string";
106 if (codec ==
"constant_string") {
110 newCodec->copyStrings(col.
coder());
112 col.
coder(std::move(newCodec));
128 if(n == 0) codec =
"constant_or_missing";
129 else if(n < 0xff) codec =
"int8_missing";
130 else if(n < 0xffff) codec =
"int16_missing";
134 if(n == 0) codec =
"constant";
135 else if(n <= 0xff) codec =
"int8";
136 else if(n <= 0xffff) codec =
"int16";
bool hasShortReal2InternalMissing() const
bool hasShortRealInternalMissing() const
int setOptimalCodecs(core::MetaData &columns)
static std::map< api::ColumnType, std::string > defaultCodec_
std::unique_ptr< Codec > build(const std::string &name, api::ColumnType type) const
static CodecFactory & instance()
virtual size_t numStrings() const
virtual size_t dataSizeDoubles() const
void hasMissing(bool h)
Delegations to Codec:
void missingValue(double v)
static api::ColumnType type(const std::string &)