Skip to content

Determinstic compression #140

Open
Open
@showvick

Description

@showvick

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions