pub enum UnpackedSize {
    WriteToHeader(Option<u64>),
    SkipWritingToHeader,
}
Expand description

Alternatives for handling unpacked size

Variants§

§

WriteToHeader(Option<u64>)

If the value is Some(u64), write the provided u64 value to the header. There is currently no check in place that verifies that this is the actual number of bytes provided by the input stream. If the value is None, write the special 0xFFFF_FFFF_FFFF_FFFF code to the header, indicating that the unpacked size is unknown.

§

SkipWritingToHeader

Do not write anything to the header. The unpacked size needs to be stored elsewhere and provided when reading the file. Note that this is a non-standard way of writing LZMA data, but is used by certain libraries such as OpenCTM.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.