Module ciso

Source
Expand description

GameCube CISO (Compact ISO).

CISO (Compact ISO) is a simple format for reducing files that contains large runs of zero bytes. The unerlying file is chunked into N blocks (N <= 32760) for an arbitrary block size. Blocks with zero data will be omitted from the compressed file.

§Parse

Because decompressed CISO files can be rather large, CisoReader is used to parse the file incrementally. The CisoReader will parse the file header to determine how many blocks that are used. What you do with the blocks is up to you, they can be access via CisoReader::blocks. To decompress the whole file at once, use CisoReader::decompress.

§Example

This is an example of parse and decompress a CISO file.

fn main() -> Result<()> {
    let mut input = File::open("compact_disc.iso")?;
    let mut reader = picori::CisoReader::new(&mut input)?;

    let mut output = OpenOptions::new()
        .write(true)
        .create(true)
        .open("disc.iso")?;
    reader.decompress(&mut output)?;
    Ok(())
}

Structs§

BlockIterator
Iterator over all blocks of a CISO file.
CisoReader
Reader for CISO files.