Simple LCG used to produce deterministic pseudo-random bytes. Keeps the test reproducible across runs and platforms while avoiding trivially-compressible input (an all-zeros buffer would make deflate look unrealistically good).
| 24 | // trivially-compressible input (an all-zeros buffer would make deflate |
| 25 | // look unrealistically good). |
| 26 | inline uint64_t nextLcg( uint64_t & state ) |
| 27 | { |
| 28 | state = state * 6364136223846793005ULL + 1442695040888963407ULL; |
| 29 | return state; |
| 30 | } |
| 31 | |
| 32 | } // namespace |
| 33 |