chphat11 Posted February 14 Posted February 14 Hello, I use K4os LZ4 Compression C# for decompress BinaryReader br = new(input); while (br.BaseStream.Position < br.BaseStream.Length) { uint BlockSize = br.ReadUInt32(); uint DecompSize = br.ReadUInt32(); byte[] BlockData = br.ReadBytes((int)BlockSize - 8); byte[] DecData = new byte[DecompSize]; int len = K4os.Compression.LZ4.LZ4Codec.Decode(BlockData, 0, (int)BlockData.Length, DecData, 0, (int)DecData.Length); Console.WriteLine("len: " + len); Console.ReadKey(); } The first block, decompress successfully, and the second block, decompress fail sample.zip
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now