Enum gix_archive::Format
source · pub enum Format {
InternalTransientNonPersistable,
Tar,
TarGz {
compression_level: Option<u8>,
},
Zip {
compression_level: Option<u8>,
},
}
Expand description
The supported container formats for use in write_stream()
.
Variants§
InternalTransientNonPersistable
An internal format that is suitable only for intra-process communication.
All transformations in the options are ignored. Calling write_stream
is disallowed
as it’s more efficient to call gix_worktree_stream::Stream::into_read() right away.
It is provided here as a basis available without extra dependencies, and as a debugging tool.
Tar
A standard tar
archive.
Use it as well if a custom container format is desired. The idea is to decode it on a separate thread to rewrite the data to the desired format.
TarGz
Fields
A convenience format that will gzip
deflate the tar
stream.
Zip
Fields
A standard zip
archive. Note that this format silently converts illformed UTF-8 to UTF-8, which will
equal a change of path.
Requires the zip
feature toggle to have an effect.
Shortcoming
Even though symlinks are stored as such, for some reason at least on MacOS those aren’t restored. That works,
however, when letting git
create the archive.