fast-lzma2 icon indicating copy to clipboard operation
fast-lzma2 copied to clipboard

How to cancel decompression?

Open jardik opened this issue 3 years ago • 2 comments

Is there correct way to cancel decompression of the stream? I am using similar code as in the file_test.c file. i.e. I call FL2_createDStreamMt once at start and then for each stream stored in a file I call FL2_initDStream and then keep calling FL2_decompressStream until I decompress all data. But if my file reading function returns an error, what should I call to cancel the decompression so that next FL2_initDStream doesn't return an error (unfinished decompression of previous stream)? It seems the example in file_test.c doesn't handle reading errors and they are just ignored. I found FL2_cancelDStream, is this the function I should call?

jardik avatar Dec 16 '20 18:12 jardik