Eric Biggers [Sun, 17 Aug 2014 16:18:47 +0000 (11:18 -0500)]
win32_apply.c: Adjust short name behavior
- Try to enable short names on the volume if it seems to be necessary to set
short names.
- Without WIMLIB_EXTRACT_FLAG_STRICT_SHORT_NAMES, still warn about how many
short names could not be set.
Eric Biggers [Thu, 14 Aug 2014 04:04:58 +0000 (23:04 -0500)]
More lz_hash_chains, lz_binary_trees performance improvements
- Use a multiplicative hash function. In practice it's as good as the
CRC32-based hash function previously used, but it's faster to compute
and requires no static data.
- Use slightly different logic that avoids the need to special-case the
extension of matches from 'nice_len' to 'max_len'.
- Faster skip_positions() by avoiding unnecessary calculations.
- Fast match length extension on x86 using unaligned word accesses and
trailing zero count.
Eric Biggers [Wed, 6 Aug 2014 02:00:00 +0000 (21:00 -0500)]
mount_image.c: Cleanup
- Improve some comments.
- Don't use the T() macro. The mount code doesn't run on Windows.
- Make sure we don't accidentally return errno=0.
- Return WIMLIB_ERR_NO_FILENAME if read-write mounting WIM that has no
backing file.
- inode_resolve_streams() already does nothing if inode->i_resolved
- create_dentry() is never called with NULL 'dentry_ret'
- attr_timeout=0 was in FUSE options two times!
- 'have_progfunc' argument to create_message_queue() was always true; get
rid of it.
- Use geteuid() rather than getuid() when testing for root
Eric Biggers [Tue, 5 Aug 2014 01:46:24 +0000 (20:46 -0500)]
write.c: Fix handling of NULL context in stream_filtered()
A NULL filter_context is supposed to be valid and interpreted as "don't
filter anything". This case can't be triggered by wimlib-imagex, but it
might be possible via custom library calls.
Eric Biggers [Sat, 2 Aug 2014 00:52:40 +0000 (19:52 -0500)]
win32_capture.c: Ignore unnamed data stream of reparse point
This data will not be archived; only the reparse data will. So there's
no need to create a 'struct wim_lookup_table_entry' for it.
If a reparse point had an unnamed data stream, the assertion introduced
in commit 321750354891a0968ca0c3664417eae73b9414aa would be triggered.
This is just as well, because this case wasn't being handled in the most
logical way.
These are essentially updated versions of
WIMLIB_PROGRESS_MSG_EXTRACT_{DIR_STRUCTURE,TIMESTAMPS} which were removed
in v1.7.0. The new versions will file periodically, so they can be used
as cancellation points where the library user provides
WIMLIB_PROGRESS_STATUS_ABORT.
Eric Biggers [Fri, 25 Jul 2014 04:35:44 +0000 (23:35 -0500)]
lz_hash_chains.c: Hand-inline do_search()
On x86_64 this improves performance slightly (XPRESS compression ~3%
faster). Probably a lot of the difference is due to redundant checks
against 'max_len' getting removed.
Eric Biggers [Sat, 26 Jul 2014 05:58:40 +0000 (00:58 -0500)]
lzms-common.c: Don't process first byte in x86 filter
Microsoft's LZMS compressor and decompressor seemingly skip this byte.
This resulted in different behavior on the following uncompressed data:
0000000 e8 6b e8 fb ff 5e 1f 03 e8 63 e8 fb ff 5e c0 02 0000016 e8 5b e8 fb ff 5e 51 01 e8 53 e8 fb ff 5e c4 00
wimlib would do a translation following the e8 byte at offset 16, since
it would enable x86 translations following the identification of matching
absolute addresses following the potential opcodes at offsets 0 and 8.
But as far as I can tell, the Microsoft implementation just skips byte 0
entirely and doesn't consider it as beginning a potential instruction.
Eric Biggers [Fri, 25 Jul 2014 01:04:29 +0000 (20:04 -0500)]
Check return value of wimlib_global_init() when called in lib
On Windows, wimlib_global_init() can fail if functions are missing from
ntdll. It's best to fail fast in this case rather than plowing ahead and
assuming the user would have already called wimlib_global_init()
themselves if they cared.
Eric Biggers [Sat, 19 Jul 2014 22:11:59 +0000 (17:11 -0500)]
Merge compression updates
- New internal match-finding API (might release as stand-alone library
sometime)
- Add some new match-finding algorithms
- Get rid of lz_hash.c / lz_analyze_block()
- Add optimal parsing to XPRESS
- Optimize get_matches() / skip_bytes() calls in XPRESS and LZX
compressors
- Get rid of decompressor parameters
- Get rid of compressor parameters exposed in API (use compression levels
instead)