X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=include%2Fwimlib%2Fresource.h;h=61ce69b5e22f337affc15bea35288162923089e3;hp=38ce568c6a210b6c1bd0866c14f90987ea5ddb63;hb=9df357d0ac3ac1f5386873dd20df2639cecd64b3;hpb=b6034a5dd44709341c46d553b1c0294ec91f13e4 diff --git a/include/wimlib/resource.h b/include/wimlib/resource.h index 38ce568c..61ce69b5 100644 --- a/include/wimlib/resource.h +++ b/include/wimlib/resource.h @@ -2,11 +2,11 @@ #define _WIMLIB_RESOURCE_H #include "wimlib/callback.h" -#include "wimlib/file_io.h" #include "wimlib/list.h" #include "wimlib/sha1.h" #include "wimlib/types.h" +struct filedes; struct wim_lookup_table_entry; struct wim_image_metadata; @@ -166,8 +166,8 @@ struct alt_chunk_table_header_disk { /* Compression format used for compressed chunks: * 0 = None - * 1 = LZX - * 2 = XPRESS + * 1 = XPRESS + * 2 = LZX * 3 = LZMS * * This overrides the compression type specified by the WIM header. */ @@ -203,6 +203,10 @@ extern int wim_reshdr_to_data(const struct wim_reshdr *reshdr, WIMStruct *wim, void **buf_ret); +extern int +wim_reshdr_to_hash(const struct wim_reshdr *reshdr, WIMStruct *wim, + u8 hash[SHA1_HASH_SIZE]); + extern int skip_wim_stream(struct wim_lookup_table_entry *lte); @@ -212,11 +216,6 @@ skip_wim_stream(struct wim_lookup_table_entry *lte); * @lte: * Stream that is about to be read. * - * @is_partial_res: - * Set to true if the stream is just one of several being read from a - * single pack and therefore would be extra expensive to read - * independently. - * * @ctx: * User-provided context. * @@ -226,7 +225,6 @@ skip_wim_stream(struct wim_lookup_table_entry *lte); * (without calling @consume_chunk or @end_stream). */ typedef int (*read_stream_list_begin_stream_t)(struct wim_lookup_table_entry *lte, - bool is_partial_res, void *ctx); #define BEGIN_STREAM_STATUS_SKIP_STREAM -1 @@ -300,9 +298,6 @@ extern int extract_full_stream_to_fd(struct wim_lookup_table_entry *lte, struct filedes *fd); -extern int -extract_chunk_to_fd(const void *chunk, size_t size, void *_fd_p); - /* Miscellaneous stream functions. */ extern int @@ -311,8 +306,7 @@ sha1_stream(struct wim_lookup_table_entry *lte); /* Functions to read/write metadata resources. */ extern int -read_metadata_resource(WIMStruct *wim, - struct wim_image_metadata *image_metadata); +read_metadata_resource(struct wim_image_metadata *imd); extern int write_metadata_resource(WIMStruct *wim, int image, int write_resource_flags);