Closed joshuaehill closed 2 years ago
You are saying the correct set of lines should be this?
// Section 6.3.4 - Estimate entropy with Compression Test (for bit strings only)
if (((data.alph_size > 2) || !initial_entropy)) {
ret_min_entropy = compression_test(data.bsymbols, data.blen, verbose, "Bitstring");
if (ret_min_entropy >= 0) {
if (verbose == 1) printf("\tCompression Test Estimate (bit string) = %f / 1 bit(s)\n", ret_min_entropy);
H_bitstring = min(ret_min_entropy, H_bitstring);
}
}
if (initial_entropy && (data.alph_size == 2)) {
ret_min_entropy = compression_test(data.symbols, data.len, verbose, "Literal");
if (ret_min_entropy >= 0) {
if (verbose == 1) printf("\tCompression Test Estimate = %f / 1 bit(s)\n", ret_min_entropy);
H_original = min(ret_min_entropy, H_original);
}
}
That looks correct, yes. There were a couple of additional instances of this sort of thing that I pointed out in comments.
For some reason I can't see the comments when looking at the commit on GH. So I pushed a new release v1.1.1 that fixes the comments I could see. Could you put the comments elsewhere with the referenced lines so I can fix them?
Will do.
Closing current issue as it's been resolved.
This test was merged out of existance, and it is important. Please replicate the testing that occurs in the binary compression testing just above.
https://github.com/usnistgov/SP800-90B_EntropyAssessment/blob/88107c861e8951d499c69d8c9de68836c18190b7/cpp/non_iid_main.cpp#L296