Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions theta/include/theta_sketch_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ size_t compact_theta_sketch_alloc<A>::get_compressed_serialized_size_bytes(uint8

template<typename A>
void compact_theta_sketch_alloc<A>::serialize(std::ostream& os) const {
const uint8_t preamble_longs = this->is_estimation_mode() ? 3 : this->is_empty() || entries_.size() == 1 ? 1 : 2;
const uint8_t preamble_longs = get_preamble_longs(false);
write(os, preamble_longs);
write(os, UNCOMPRESSED_SERIAL_VERSION);
write(os, SKETCH_TYPE);
Expand Down Expand Up @@ -459,7 +459,7 @@ uint8_t compact_theta_sketch_alloc<A>::compute_entry_bits() const {

template<typename A>
void compact_theta_sketch_alloc<A>::serialize_version_4(std::ostream& os) const {
const uint8_t preamble_longs = this->is_estimation_mode() ? 2 : 1;
const uint8_t preamble_longs = get_preamble_longs(true);
const uint8_t entry_bits = compute_entry_bits();
const uint8_t num_entries_bytes = get_num_entries_bytes();

Expand Down