-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incompatibility Issue Between EasyCompressor Versions 1.4.0 and 2.0.2 Resulting in Corrupted Pickle (LZ4) #200
Comments
Hi @nathan5580 Thank you for your comprehensive report. ReasonAccording to the changelog for v2.0.2, the default compression mode of LZ4 has been changed (to optimize the performance and memory allocation)
BenchmarkYou can see the comparison benchmark between these 3 modes (HTML and Image) SolutionIn order to mitigate this breaking change, you just need to set the compression mode to //Configure Services
//Use and overload that accepts the LZ4BinaryCompressionMode enum value
services.AddLZ4Compressor(LZ4BinaryCompressionMode.LegacyCompatible)
//Or if you are instantiating LZ4Compressor directly
//Use a constructor overload that accepts the LZ4BinaryCompressionMode enum value
var compressor = new LZ4Compressor(LZ4BinaryCompressionMode.LegacyCompatible); |
Hi @mjebrahimi , Thank you very much for the detailed and informative response. It turns out I was attempting the update in the wrong project, where the specified configurations do not apply. After re-evaluating and applying your suggested solution to the correct project, I can confirm that setting the compression mode to I appreciate your swift support and the clarity of your explanation, which guided me to the right solution. Thanks again for your help! |
Description:
After updating the EasyCompressor library from version 1.4.0 to 2.0.2 in our project, we encountered an issue related to LZ4 compression where the compressed data appears to be corrupted, yielding the error: "Pickle is corrupted: Version 7 is not recognized". This issue has disrupted the functionality related to file data retrieval in our application, specifically when attempting to decompress data that was compressed with the previous version of EasyCompressor.
Error Message:
Steps to Reproduce:
Expected Behavior:
The data compressed with version 1.4.0 should be decompressed successfully with version 2.0.2 without any errors or data corruption.
Actual Behavior:
The decompression process fails, and the application throws an error indicating that the pickle version is not recognized.
Questions:
Environment:
We would appreciate any guidance or suggestions on how to address this issue to ensure smooth data handling across different versions of EasyCompressor. Thank you for your support.
The text was updated successfully, but these errors were encountered: