X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Flookup_table.h;h=ca418219a898aaf1cf7b83e07cb2b580d66f6e7a;hb=ebd6c0ec0ff47ac18af4ef918fd78fb8d9f19540;hp=242e2c1b87f04863ee26ba33a0daea66ddf29475;hpb=1530b6dab02a9e1e5faf81529ab502aee68d8cd2;p=wimlib diff --git a/src/lookup_table.h b/src/lookup_table.h index 242e2c1b..ca418219 100644 --- a/src/lookup_table.h +++ b/src/lookup_table.h @@ -11,13 +11,19 @@ #define LOOKUP_FLAG_ADS_OK 0x00000001 #define LOOKUP_FLAG_DIRECTORY_OK 0x00000002 -/* Not yet used */ -//#define LOOKUP_FLAG_FOLLOW_SYMLINKS 0x00000004 - -/* A lookup table that is used to translate the hash codes of dentries into the - * offsets and sizes of uncompressed or compressed file resources. It is - * implemented as a hash table. */ +/* The lookup table of a WIM file maps SHA1 message digests to streams of data. + * Here, the in-memory structure is implemented as a hash table. + * + * Given a SHA1 message digest, the mapped-to stream is specified by an offset + * in the WIM, an uncompressed and compressed size, and resource flags (see + * 'struct resource_entry'). But, we associate additional information, such as + * a reference count, with each stream, so the actual mapping is from SHA1 + * message digests to 'struct wim_lookup_table_entry's, each of which contains + * an embedded 'struct resource_entry'. + * + * Note: Everything will break horribly if there is a SHA1 collision. + */ struct wim_lookup_table { struct hlist_head *array; u64 num_entries; @@ -71,6 +77,10 @@ enum resource_location { * point or not. @ntfs_loc points to a structure containing this * information. */ RESOURCE_IN_NTFS_VOLUME, + + /* Resource must be accessed using Win32 API (may be a named data + * stream) */ + RESOURCE_WIN32, }; /* @@ -265,7 +275,8 @@ extern struct wim_lookup_table_entry * clone_lookup_table_entry(const struct wim_lookup_table_entry *lte); extern void -print_lookup_table_entry(const struct wim_lookup_table_entry *entry); +print_lookup_table_entry(const struct wim_lookup_table_entry *entry, + FILE *out); extern void free_lookup_table_entry(struct wim_lookup_table_entry *lte);