Skip to content

Commit 6132647

Browse files
authored
Merge branch 'main' into refine_theta_sketch
2 parents c3098c6 + bf8438f commit 6132647

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

datasketches/src/theta/sketch.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -460,16 +460,12 @@ impl CompactThetaSketch {
460460
fn preamble_longs(&self, compressed: bool) -> u8 {
461461
if compressed {
462462
if self.is_estimation_mode() { 2 } else { 1 }
463+
} else if self.is_estimation_mode() {
464+
3
465+
} else if self.is_empty() || self.entries.len() == 1 {
466+
1
463467
} else {
464-
if self.is_estimation_mode() {
465-
3
466-
} else {
467-
if self.is_empty() || self.entries.len() == 1 {
468-
1
469-
} else {
470-
2
471-
}
472-
}
468+
2
473469
}
474470
}
475471

0 commit comments

Comments
 (0)