Skip to content

Commit 71160ce

Browse files
committed
Readds check on binary compression test
1 parent 5db161b commit 71160ce

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cpp/non_iid_main.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,10 @@ int main(int argc, char* argv[]) {
294294

295295
if (initial_entropy && (data.alph_size == 2)) {
296296
ret_min_entropy = compression_test(data.symbols, data.len, verbose, "Literal");
297-
if (verbose == 1) printf("\ttCompression Test Estimate = %f / 1 bit(s)\n", ret_min_entropy);
298-
H_original = min(ret_min_entropy, H_original);
297+
if (ret_min_entropy >= 0) {
298+
if (verbose == 1) printf("\tCompression Test Estimate = %f / 1 bit(s)\n", ret_min_entropy);
299+
H_original = min(ret_min_entropy, H_original);
300+
}
299301
}
300302

301303
NonIidTestCase tc634;

0 commit comments

Comments
 (0)