Namespaces

Records

Functions

  • std::optional<uint64_t> GetUnsparsedSize (const void * buffer, size_t size)

    Returns the unsparsed size of `buffer` if this is an Android sparse image, otherwise returns

    std::nullopt. `buffer` must have the correct alignment.

    Defined at line 68 of file ../../src/firmware/lib/fastboot/sparse_format.cc

  • std::optional<uint64_t> GetUnsparsedSize (const fzl::OwnedVmoMapper & buffer)

    Returns the unsparsed size of `buffer` if this is an Android sparse image, otherwise returns

    std::nullopt. `buffer` must have the correct alignment.

    Defined at line 79 of file ../../src/firmware/lib/fastboot/sparse_format.cc

  • bool IsSparseFormat (const fzl::OwnedVmoMapper & buffer)

    Returns true if `buffer` is in the Android sparse format, false otherwise.

    Defined at line 83 of file ../../src/firmware/lib/fastboot/sparse_format.cc

  • zx::result<> Unsparse (fzl::OwnedVmoMapper & srczx::vmo & dstfzl::OwnedVmoMapper & fill_bufferUnsparseErrorLogger logger)

    Unsparses the sparse file from `src` directly into `dst`. `dst` must be large enough to

    accommodate the unsparsed payload (see `GetUnsparsedSize`). `fill_buffer` is used to optimize

    fill chunks and should have a size which is a multiple of 4 bytes.

    Defined at line 87 of file ../../src/firmware/lib/fastboot/sparse_format.cc