LZMA SDK Compress Decompress
7z is one of the best if not the best file compression available. Best of all, it is open source. The engine behind it is the LZMA compression method. I was integrating the sdk ( https://www.7-zip.org/sdk.html ) in my project, but however, can't get a quick start on the compress decompress process. After searching the internet, I figured out on a surface level how it all works. Partially thanks to the question in https://stackoverflow.com/questions/7646328/how-to-use-the-7z-sdk-to-compress-and-decompress-a-file . So, below, I write down my basic understanding. Compress Basically, the compressed file will contain 3 things with the first 2 are metadata: The first 5 bytes are compression properties The next 8 bytes are file size before compression The compressed bytes var encoder = New Encoder(); encoder.WriteCoderProperties(outStream); // Write properties encoder.Write(BitConverter.GetBytes(inputFileSize), 0, 8); // Write uncompressed file size encoder.Code(inStream, out...