Skip to main content

Crate sparse

Crate sparse 

Source

Modules§

builder
reader

Structs§

SparseFileWriter
An in-memory description of an Android sparse image file.
SparseSliceReader
SparseSliceReader is an io::Read stream that lazily emits the binary Android Sparse Image serialization (headers and payload) for a single SparseFileWriter slice directly from the underlying source reader without intermediate disk files.

Enums§

Chunk
DeserializeError
SparseDataType
SparseError
UnalignedSource

Constants§

NO_SOURCE
Chunk::write takes an Option of something that implements Read. The compiler still requires a concrete type for the generic argument even when the Option is None. This constant can be used in place of None to avoid having to specify a type for the source.

Traits§

Writer
A union trait for Write and Seek that also allows truncation.

Functions§

build_sparse_files
Takes the given file_to_upload for the named partition and creates a set of temporary files in the given dir in Sparse Image Format. With the provided max_download_size constraining file size.
build_sparse_writers
Takes the given file_to_upload for the named partition and creates a set of SparseFileWriter slices in memory with the provided max_download_size constraining slice size.
build_sparse_writers_streaming
Takes the given file_to_upload for the named partition and generates SparseFileWriter slices on the fly, emitting each slice as soon as it reaches max_download_size.
is_sparse_image
Returns whether the image in reader appears to be in the sparse format.
resparse
Takes a sparse_file and breaks it into multiple SparseFileWriter slices whose serialized file size will not exceed max_download_size.
resparse_sparse_img
Takes a provided reader and generates a set of temporary files in dir in the Sparse image format. With the provided max_download_size constraining file size.
resparse_sparse_img_writers
Takes a provided reader and generates a set of SparseFileWriters representing the resparsed slices with the provided max_download_size constraining slice size.
unsparse
Reads a sparse image from source and expands it to its unsparsed representation in dest.