pub struct ZipLocalFileHeader<'a> {
Show 16 fields pub version_required_to_extract: u16, pub general_purpose_flags: u16, pub compression_method: u16, pub last_mod_time: u16, pub last_mod_date: u16, pub crc32: u32, pub compressed_size: u32, pub uncompressed_size: u32, pub file_name_length: u16, pub extra_field_length: u16, pub file_name_raw: Vec<u8>, pub extra_field: Vec<u8>, pub compressed_data: Cow<'a, [u8]>, pub data_descriptor: Option<ZipDataDescriptor>, pub starting_position_with_signature: u64, pub starting_position_without_signature: u64,
}
Expand description

An entry of local header of ZIP file

Fields

version_required_to_extract: u16

As the name implies; see 4.4.3 in https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT

Unaffected by file renaming

general_purpose_flags: u16

See 4.4.4 in https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT

bit #n reprents 1 << n in little endian

Unaffected by file renaming

compression_method: u16

As the name implies; see 4.4.5 in https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT

Unaffected by file renaming

last_mod_time: u16

As the name implies; see 4.4.6 in https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT

MS-DOS time: http://www.ffortune.net/calen/calen/etime.htm (Japanese)

Unaffected by file renaming

last_mod_date: u16

As the name implies; see 4.4.6 in https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT

MS-DOS time: http://www.ffortune.net/calen/calen/etime.htm (Japanese)

Unaffected by file renaming

crc32: u32

See 4.4.7 in https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT

Unaffected by file renaming

compressed_size: u32

As the name implies. Note that the file name is not included.

uncompressed_size: u32

As the name implies. Note that the file name is not included.

file_name_length: u16

As the name implies.

extra_field_length: u16

As the name implies.

file_name_raw: Vec<u8>

Byte sequence of the file name.

extra_field: Vec<u8>

Byte sequence of extra field

compressed_data: Cow<'a, [u8]>

File content

data_descriptor: Option<ZipDataDescriptor>

Data descriptor just after the file content (exists only when bit #3 of general purpose flag is set)

starting_position_with_signature: u64

ローカルファイルヘッダの開始位置 (マジックナンバー) / (magick number of) local file header starting position

starting_position_without_signature: u64

ローカルファイルヘッダの開始位置 (マジックナンバーすぐ次) / Local file header starting position (next to magick number)

Implementations

Sets bit #11 of general purpose bit to indicate that the file name & comment are encoded in UTF-8.

Replaces the file name.

Arguments
  • name - Slice of new name

Reads local file header from the cjurrent position.

Arguments
  • read - file handler (must be at the start of the signature)

Examines the signature, reads the local file header and returns an instance that represents it

Arguments
  • read - file handler (must be at the head of the signature)

Writes the content of this local file header to file and returns the number of bytes written.

Arguments
  • write - file handler

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 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.