mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Merge pull request #112 from oshogbo:zstd_opt
PiperOrigin-RevId: 430179725 Change-Id: Ic3c93a51a199eaf087cea2e58c819eb07bf52a1a
This commit is contained in:
commit
4024694eb6
|
@ -78,9 +78,9 @@ absl::Status DecompressInMemory(ZstdApi& api, std::ifstream& in_stream,
|
||||||
}
|
}
|
||||||
sapi::v::Array<uint8_t> outbuf(size);
|
sapi::v::Array<uint8_t> outbuf(size);
|
||||||
|
|
||||||
SAPI_ASSIGN_OR_RETURN(
|
SAPI_ASSIGN_OR_RETURN(size_t desize,
|
||||||
size_t desize, api.ZSTD_decompress(outbuf.PtrAfter(), size,
|
api.ZSTD_decompress(outbuf.PtrAfter(), size,
|
||||||
inbuf.PtrBefore(), inbuf.GetSize()));
|
inbuf.PtrNone(), inbuf.GetSize()));
|
||||||
SAPI_ASSIGN_OR_RETURN(iserr, api.ZSTD_isError(desize));
|
SAPI_ASSIGN_OR_RETURN(iserr, api.ZSTD_isError(desize));
|
||||||
if (iserr) {
|
if (iserr) {
|
||||||
return absl::UnavailableError("Unable to decompress file");
|
return absl::UnavailableError("Unable to decompress file");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user