Skip to content

Commit

Permalink
[example] revert sample code back to zlib from lzma test
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Aug 18, 2024
1 parent 7c3b09b commit 26b1147
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions example/c/testzmat.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int main(void) {
/*=====================================*/

/*first, perform zlib compression use the highest compression (-9); one can use zmat_encode as well*/
ret = zmat_run(strlen(test[0]), (unsigned char*)test[0], &compressedlen, &compressed, zmLzma, &status, flags.iscompress);
ret = zmat_run(strlen(test[0]), (unsigned char*)test[0], &compressedlen, &compressed, zmZlib, &status, flags.iscompress);

if (ret == 0) {
/*next, encode the compressed data using base64*/
Expand Down Expand Up @@ -68,7 +68,7 @@ int main(void) {

if (ret == 0) {
/*next, decompress using zlib (deflate) */
ret = zmat_decode(decodelen, decoded, &decompressedlen, &decompressed, zmLzma, &status);
ret = zmat_decode(decodelen, decoded, &decompressedlen, &decompressed, zmZlib, &status);

if (ret == 0) {
printf("\t\"decompressed\":\"%s\",\n", decompressed);
Expand Down

0 comments on commit 26b1147

Please sign in to comment.