Merge changes I5032300e,Idec3e051,I09be447b into main

* changes:
  ZSTD read from wrong buf
  Fix warning
  Fix zstd optimization api usage