File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -376,7 +376,7 @@ size_t compact_theta_sketch_alloc<A>::get_compressed_serialized_size_bytes(uint8
376376
377377template <typename A>
378378void compact_theta_sketch_alloc<A>::serialize(std::ostream& os) const {
379- const uint8_t preamble_longs = this -> is_estimation_mode () ? 3 : this -> is_empty () || entries_. size () == 1 ? 1 : 2 ;
379+ const uint8_t preamble_longs = get_preamble_longs ( false ) ;
380380 write (os, preamble_longs);
381381 write (os, UNCOMPRESSED_SERIAL_VERSION);
382382 write (os, SKETCH_TYPE);
@@ -459,7 +459,7 @@ uint8_t compact_theta_sketch_alloc<A>::compute_entry_bits() const {
459459
460460template <typename A>
461461void compact_theta_sketch_alloc<A>::serialize_version_4(std::ostream& os) const {
462- const uint8_t preamble_longs = this -> is_estimation_mode () ? 2 : 1 ;
462+ const uint8_t preamble_longs = get_preamble_longs ( true ) ;
463463 const uint8_t entry_bits = compute_entry_bits ();
464464 const uint8_t num_entries_bytes = get_num_entries_bytes ();
465465
You can’t perform that action at this time.
0 commit comments