Restored : lz4 compression function using externally allocated memory for state