Enum android_sparse::file::Chunk[][src]

pub enum Chunk {
    Raw {
        file: Rc<RefCell<StdFile>>,
        offset: u64,
        num_blocks: u32,
    },
    Fill {
        fill: [u8; 4],
        num_blocks: u32,
    },
    DontCare {
        num_blocks: u32,
    },
    Crc32 {
        crc: u32,
    },
}

A sparse file chunk.

A chunk represents either:

  • a part of the raw image of size num_blocks * BLOCK_SIZE, or
  • the CRC32 checksum of the raw image data up to this point

Variants

Chunk representing blocks of raw bytes.

To keep memory usage low, a raw chunk holds a reference to its backing file instead of the actual raw data.

Fields of Raw

Reference to the backing file.

Offset into the backing file to the start of the raw bytes.

Number of blocks contained in this chunk.

Chunk representing blocks filled with the same 4-byte value.

Fields of Fill

The 4-byte fill value.

Number of blocks contained in this chunk.

Chunk representing blocks of ignored data.

Fields of DontCare

Number of blocks contained in this chunk.

Chunk holding the CRC32 checksum value of all previous data chunks.

Fields of Crc32

The CRC32 checksum value.

Methods

impl Chunk
[src]

Returns this chunk's size in a sparse image.

Returns the size of this chunk's decoded raw data.

Returns the number of blocks contained in this chunk.

Trait Implementations

impl Debug for Chunk
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl !Send for Chunk

impl !Sync for Chunk