Magic number (shown in hex) -> 0x184D2204 (hex)
FLG (shown in binary) -> $version="01" , $b_ind="0" , $b_csum="0" , $c_size="0" , $c_csum=”1” , $rsvd ="0", $dict_id="0"
BD (shown in decimal) -> Block_max_size= 6 (The original uncompressed file is much less than 1MB)
HC = calculated using the xxhash that came with the LZ4.
Then I add the two blocks
<block_size0,block_data0><block_size1,block_data1>
The I add the
End Mark (shown in hex) = 0000_0000
Check sum = calculated using the xxhash
Now if I try to decompress using the lz4 -d , I get a Error 66 : Decompression error : ERROR_decompressionFailed
I usually have independent blocks and I create frames for each blocks and concatenate the frames. Then I decompress using the lz4 utility. In that case I never have a problem.