1
0
mirror of https://github.com/facebook/zstd.git synced 2025-07-29 11:21:22 +03:00

use ZSTD_sequenceBound in seqBench

This commit is contained in:
Danielle Rozenblit
2022-09-09 13:04:41 -07:00
parent 88b49e923b
commit 1613caf8bd

View File

@ -22,9 +22,7 @@ int main(int argc, char *argv[]) {
fread(inBuf, inBufSize, 1, f);
fclose(f);
// Should work fine for this benchmark, but we really need
// a function like ZSTD_compressBound() for sequences
size_t seqsSize = 2 * (inBufSize / sizeof(ZSTD_Sequence));
size_t seqsSize = ZSTD_sequenceBound(inBufSize);
ZSTD_Sequence *seqs = (ZSTD_Sequence*)malloc(seqsSize * sizeof(ZSTD_Sequence));
char *outBuf = malloc(ZSTD_compressBound(inBufSize));