MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / getBitpackInfo

Method getBitpackInfo

src/storage/compression/float_compression.cpp:183–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181
182template<std::floating_point T>
183BitpackInfo<typename FloatCompression<T>::EncodedType> FloatCompression<T>::getBitpackInfo(
184 const CompressionMetadata& metadata) {
185 const auto& bitpackMetadata = metadata.getChild(BITPACKING_CHILD_IDX);
186 if (bitpackMetadata.isConstant()) {
187 const auto constValue = bitpackMetadata.min.get<EncodedType>();
188 return {.bitWidth = 0, .hasNegative = (constValue < 0), .offset = constValue};
189 } else {
190 return IntegerBitpacking<EncodedType>::getPackingInfo(bitpackMetadata);
191 }
192}
193
194template<std::floating_point T>
195bool FloatCompression<T>::canUpdateInPlace(std::span<const T> value,

Callers

nothing calls this directly

Calls 2

isConstantMethod · 0.80
getChildMethod · 0.45

Tested by

no test coverage detected