class ExternalDecompressorClient

Defined at line 43 of file ../../src/storage/blobfs/compression/external_decompressor.h

A client class for managing the connection to the decompressor sandbox, sending messages, and

returning the status result. This class is *not* thread safe.

Public Methods

zx::result<std::unique_ptr<ExternalDecompressorClient>> Create (DecompressorCreatorConnector * connector, const zx::vmo & decompressed_vmo, const zx::vmo & compressed_vmo)

Creates a DecompressorClient that takes data from `compressed_vmo` and places the results in

`decompressed_vmo`. This calls `Prepare()` and returns a failure if it cannot succeed on the

first try. Both vmos require the ZX_DEFAULT_VMO_RIGHTS except that ZX_RIGHT_WRITE is not

required on `compressed_vmo`, this permission will be omitted before sending to the external

decompressor if present.

Defined at line 44 of file ../../src/storage/blobfs/compression/external_decompressor.cc

void ExternalDecompressorClient (const ExternalDecompressorClient & )

Defined at line 45 of file ../../src/storage/blobfs/compression/external_decompressor.h

void ExternalDecompressorClient (ExternalDecompressorClient && )

Defined at line 45 of file ../../src/storage/blobfs/compression/external_decompressor.h

ExternalDecompressorClient & operator= (const ExternalDecompressorClient & )

Defined at line 45 of file ../../src/storage/blobfs/compression/external_decompressor.h

ExternalDecompressorClient & operator= (ExternalDecompressorClient && )

Defined at line 45 of file ../../src/storage/blobfs/compression/external_decompressor.h

zx_status_t SendMessage (const fuchsia_blobfs_internal::wire::DecompressRequest & request)

Sends the request over the fifo, and awaits the response before verifying the resulting size

and reporting the status passed from the server. This succeeds only if the resulting

decompressed size matches the `decompressed.size`. Starts by calling `Prepare()`.

Defined at line 185 of file ../../src/storage/blobfs/compression/external_decompressor.cc

std::optional<CompressionAlgorithm> CompressionAlgorithmFidlToLocal (fuchsia_blobfs_internal::wire::CompressionAlgorithm algorithm)

Convert from fidl compatible enum to local. Returns nullopt if invalid.

Defined at line 217 of file ../../src/storage/blobfs/compression/external_decompressor.cc

fuchsia_blobfs_internal::wire::CompressionAlgorithm CompressionAlgorithmLocalToFidl (CompressionAlgorithm algorithm)

Convert to fidl compatible enum from local.

Defined at line 231 of file ../../src/storage/blobfs/compression/external_decompressor.cc

zx::result<fuchsia_blobfs_internal::wire::CompressionAlgorithm> CompressionAlgorithmLocalToFidlForPartial (CompressionAlgorithm algorithm)

Convert to fidl compatible enum from local for partial decompression.

Defined at line 245 of file ../../src/storage/blobfs/compression/external_decompressor.cc