intel / intel/isa-l

Determinstic compression

Open
#140 12 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
C
Stars
1.1k
Forks
346
PR merge metrics
No merged PRs in 30d

Description

We see great results with ISAL hence we are planning on adding it to our application. One of our requirements is that we get the same compressed output if we call ISAL compress multiple times on the same payload data. With ZLIB we always get the same compressed output. Will we get the same output every time or we can get different compressed output for the same payload? Also if the compressed output is different can the length be different?

As an example first we compress payload A and get B. If we compress payload A again, will be get B again?
Case 1 :- compress (A) --> B
Case 2 (Recovery) :- compress (A) --> will be B as above?

Appreciate your help.

We use the following code to compress data


isal_deflate_stateless_init(&isalstream);
isalstream.end_of_stream = 1;
isalstream.flush = NO_FLUSH;
isalstream.next_in = (Bytef *)cmpinstart_p;
isalstream.avail_in = bytestocompress;
isalstream.next_out = (Bytef *)cmpoutstart_p;
isalstream.avail_out = length;
isalstream.gzip_flag = IGZIP_ZLIB;

isalstream.level = 2;
isalstream.level_buf = blkalloc(NULL, 1, ISAL_DEF_LVL2_DEFAULT);
isalstream.level_buf_size = ISAL_DEF_LVL2_DEFAULT;

zret = isal_deflate_stateless(&isalstream);

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.