wimlib
Data Fields
wimlib_resource_entry Struct Reference

Information about a "blob", which is a fixed length sequence of binary data. More...

#include <wimlib.h>

Data Fields

uint64_t uncompressed_size
 If this blob is not missing, then this is the uncompressed size of this blob in bytes. More...
 
uint64_t compressed_size
 If this blob is located in a non-solid WIM resource, then this is the compressed size of that resource. More...
 
uint64_t offset
 If this blob is located in a non-solid WIM resource, then this is the offset of that resource within the WIM file containing it. More...
 
uint8_t sha1_hash [20]
 The SHA-1 message digest of the blob's uncompressed contents. More...
 
uint32_t part_number
 If this blob is located in a WIM resource, then this is the part number of the WIM file containing it. More...
 
uint32_t reference_count
 If this blob is not missing, then this is the number of times this blob is referenced over all images in the WIM. More...
 
uint32_t is_compressed: 1
 1 iff this blob is located in a non-solid compressed WIM resource. More...
 
uint32_t is_metadata: 1
 1 iff this blob contains the metadata for an image. More...
 
uint32_t is_free: 1
 
uint32_t is_spanned: 1
 
uint32_t is_missing: 1
 1 iff a blob with this hash was not found in the blob lookup table of the WIMStruct. More...
 
uint32_t packed: 1
 1 iff this blob is located in a solid resource. More...
 
uint32_t reserved_flags: 26
 
uint64_t raw_resource_offset_in_wim
 If this blob is located in a solid WIM resource, then this is the offset of that solid resource within the WIM file containing it. More...
 
uint64_t raw_resource_compressed_size
 If this blob is located in a solid WIM resource, then this is the compressed size of that solid resource. More...
 
uint64_t raw_resource_uncompressed_size
 If this blob is located in a solid WIM resource, then this is the uncompressed size of that solid resource. More...
 
uint64_t reserved [1]
 

Detailed Description

Information about a "blob", which is a fixed length sequence of binary data.

Each nonempty stream of each file in a WIM image is associated with a blob. Blobs are deduplicated within a WIM file.

TODO: this struct needs to be renamed, and perhaps made into a union since there are several cases. I'll try to list them below:

  1. The blob is "missing", meaning that it is referenced by hash but not actually present in the WIM file. In this case we only know the sha1_hash. This case can only occur with wimlib_iterate_dir_tree(), never wimlib_iterate_lookup_table().
  2. Otherwise we know the sha1_hash, the uncompressed_size, the reference_count, and the is_metadata flag. In addition:

    A. If the blob is located in a non-solid WIM resource, then we also know the compressed_size and offset.

    B. If the blob is located in a solid WIM resource, then we also know the offset, raw_resource_offset_in_wim, raw_resource_compressed_size, and raw_resource_uncompressed_size. But the "offset" is actually the offset in the uncompressed solid resource rather than the offset from the beginning of the WIM file.

    C. If the blob is not located in any type of WIM resource, then we don't know any additional information.

Unknown or irrelevant fields are left zeroed.

Field Documentation

◆ uncompressed_size

uint64_t wimlib_resource_entry::uncompressed_size

If this blob is not missing, then this is the uncompressed size of this blob in bytes.


◆ compressed_size

uint64_t wimlib_resource_entry::compressed_size

If this blob is located in a non-solid WIM resource, then this is the compressed size of that resource.


◆ offset

uint64_t wimlib_resource_entry::offset

If this blob is located in a non-solid WIM resource, then this is the offset of that resource within the WIM file containing it.

If this blob is located in a solid WIM resource, then this is the offset of this blob within that solid resource when uncompressed.

◆ sha1_hash

uint8_t wimlib_resource_entry::sha1_hash[20]

The SHA-1 message digest of the blob's uncompressed contents.


◆ part_number

uint32_t wimlib_resource_entry::part_number

If this blob is located in a WIM resource, then this is the part number of the WIM file containing it.


◆ reference_count

uint32_t wimlib_resource_entry::reference_count

If this blob is not missing, then this is the number of times this blob is referenced over all images in the WIM.

This number is not guaranteed to be correct.

◆ is_compressed

uint32_t wimlib_resource_entry::is_compressed

1 iff this blob is located in a non-solid compressed WIM resource.

◆ is_metadata

uint32_t wimlib_resource_entry::is_metadata

1 iff this blob contains the metadata for an image.


◆ is_free

uint32_t wimlib_resource_entry::is_free

◆ is_spanned

uint32_t wimlib_resource_entry::is_spanned

◆ is_missing

uint32_t wimlib_resource_entry::is_missing

1 iff a blob with this hash was not found in the blob lookup table of the WIMStruct.

This normally implies a missing call to wimlib_reference_resource_files() or wimlib_reference_resources().

◆ packed

uint32_t wimlib_resource_entry::packed

1 iff this blob is located in a solid resource.


◆ reserved_flags

uint32_t wimlib_resource_entry::reserved_flags

◆ raw_resource_offset_in_wim

uint64_t wimlib_resource_entry::raw_resource_offset_in_wim

If this blob is located in a solid WIM resource, then this is the offset of that solid resource within the WIM file containing it.


◆ raw_resource_compressed_size

uint64_t wimlib_resource_entry::raw_resource_compressed_size

If this blob is located in a solid WIM resource, then this is the compressed size of that solid resource.


◆ raw_resource_uncompressed_size

uint64_t wimlib_resource_entry::raw_resource_uncompressed_size

If this blob is located in a solid WIM resource, then this is the uncompressed size of that solid resource.


◆ reserved

uint64_t wimlib_resource_entry::reserved[1]

The documentation for this struct was generated from the following file: