Merge pull request #112 from oshogbo:zstd_opt

PiperOrigin-RevId: 430179725
Change-Id: Ic3c93a51a199eaf087cea2e58c819eb07bf52a1a
This commit is contained in:
Copybara-Service 2022-02-22 04:21:24 -08:00
commit 4024694eb6

View File

@ -78,9 +78,9 @@ absl::Status DecompressInMemory(ZstdApi& api, std::ifstream& in_stream,
}
sapi::v::Array<uint8_t> outbuf(size);
SAPI_ASSIGN_OR_RETURN(
size_t desize, api.ZSTD_decompress(outbuf.PtrAfter(), size,
inbuf.PtrBefore(), inbuf.GetSize()));
SAPI_ASSIGN_OR_RETURN(size_t desize,
api.ZSTD_decompress(outbuf.PtrAfter(), size,
inbuf.PtrNone(), inbuf.GetSize()));
SAPI_ASSIGN_OR_RETURN(iserr, api.ZSTD_isError(desize));
if (iserr) {
return absl::UnavailableError("Unable to decompress file");