Skip to content

Commit 19c9e6e

Browse files
authored
Update simple16.h
1 parent c69935a commit 19c9e6e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

headers/simple16.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
namespace FastPForLib {
1919

2020
/**
21+
* This is an implementation of the popular Simple16 scheme. It is limited to
22+
* 28-bit integers (between 0 and 2^28-1).
23+
*
2124
* If MarkLength is true, than the number of symbols is written
2225
* in the stream. Otherwise you need to specify it using the nvalue
2326
* parameter decodeArray.
@@ -375,7 +378,7 @@ void Simple16<MarkLength>::encodeArray(const uint32_t *in, const size_t length,
375378
if ((*in >> 28) > 0) {
376379
std::cerr << "Input's out of range: " << *in << std::endl;
377380
throw std::runtime_error(
378-
"You tried to apply Simple16 to an incompatible set of integers.");
381+
"You tried to apply Simple16 to an incompatible set of integers: they should be in [0,2^28).");
379382
}
380383
out[0] = 15;
381384
NumberOfValuesCoded = 1;

0 commit comments

Comments
 (0)