wimlib
5 years agoMove XPRESS_TABLEBITS to xpress-decompress.c
Eric Biggers [Sat, 6 Sep 2014 17:40:58 +0000 (12:40 -0500)]
Move XPRESS_TABLEBITS to xpress-decompress.c

5 years agolz_copy(): Unroll first iteration
Eric Biggers [Sat, 6 Sep 2014 16:54:16 +0000 (11:54 -0500)]
lz_copy(): Unroll first iteration

Most matches are short, so 1 iteration is the most common case.
Use separate branch for this.

5 years agolzx-decompress.c: Don't allow using offsets of 0
Eric Biggers [Sat, 6 Sep 2014 06:08:03 +0000 (01:08 -0500)]
lzx-decompress.c: Don't allow using offsets of 0

This can happen if an uncompressed block is present, since then the match
offset LRU queue is filled directly from the input buffer.  Too-large
offsets were already checked later, but offsets of 0 would cause
uninitialized memory to remain in the output buffer.

5 years agoUpdate input_bitstream
Eric Biggers [Sat, 6 Sep 2014 06:07:46 +0000 (01:07 -0500)]
Update input_bitstream

- Very slightly more efficient
- Don't access any internal members from LZX decompressor

5 years agoconfigure.ac: Remove unnused variable SHA1_SOURCES
Eric Biggers [Sat, 6 Sep 2014 05:16:39 +0000 (00:16 -0500)]
configure.ac: Remove unnused variable SHA1_SOURCES

5 years agoupdate_image.c: Don't set RP_FIX until all commands have finished
Eric Biggers [Sat, 6 Sep 2014 05:08:47 +0000 (00:08 -0500)]
update_image.c: Don't set RP_FIX until all commands have finished

5 years agowin32_capture.c: Use volume ID as device number
Eric Biggers [Sat, 6 Sep 2014 04:56:20 +0000 (23:56 -0500)]
win32_capture.c: Use volume ID as device number

5 years agoupdate_image.c: Remove update1()
Eric Biggers [Sat, 6 Sep 2014 03:39:27 +0000 (22:39 -0500)]
update_image.c: Remove update1()

This makes the three wrapper functions more obvious at first glance.

5 years agoxml.c: Minor cleanup
Eric Biggers [Sat, 6 Sep 2014 03:33:08 +0000 (22:33 -0500)]
xml.c: Minor cleanup

5 years agoxml.c: Simplify node_get_string()
Eric Biggers [Sat, 6 Sep 2014 03:26:03 +0000 (22:26 -0500)]
xml.c: Simplify node_get_string()

5 years agowimlib.h: Add section about backwards compatibility
Eric Biggers [Sat, 6 Sep 2014 02:36:43 +0000 (21:36 -0500)]
wimlib.h: Add section about backwards compatibility

5 years agoAdd WIMLIB_ERR_FVE_LOCKED_VOLUME
Eric Biggers [Thu, 4 Sep 2014 04:43:53 +0000 (23:43 -0500)]
Add WIMLIB_ERR_FVE_LOCKED_VOLUME

5 years agoread_capture_config(): Don't warn about compression sections
Eric Biggers [Thu, 4 Sep 2014 04:37:04 +0000 (23:37 -0500)]
read_capture_config(): Don't warn about compression sections

5 years agoRemove WINDOWS_LDADD
Eric Biggers [Thu, 4 Sep 2014 04:20:53 +0000 (23:20 -0500)]
Remove WINDOWS_LDADD

Linking with shlwapi is no longer needed.

5 years agoREADME, configure.ac: Updates regarding building wimlib
Eric Biggers [Thu, 4 Sep 2014 03:52:23 +0000 (22:52 -0500)]
README, configure.ac:  Updates regarding building wimlib

The only real changes are:

* --without-fuse by default on non-Linux UNIX
* Explicit check for libattr when libfuse enabled

All other changes are documentation improvements.

5 years agoUpdate wimoptimize documentation
Eric Biggers [Tue, 2 Sep 2014 01:49:28 +0000 (20:49 -0500)]
Update wimoptimize documentation

5 years agoSupport for file exclusions via progress function
Eric Biggers [Sat, 30 Aug 2014 17:05:30 +0000 (12:05 -0500)]
Support for file exclusions via progress function

5 years agoUpdate make-releases
Eric Biggers [Sat, 30 Aug 2014 00:09:40 +0000 (19:09 -0500)]
Update make-releases

5 years agoUpdate NEWS
Eric Biggers [Sat, 30 Aug 2014 00:03:52 +0000 (19:03 -0500)]
Update NEWS

5 years agoFactor out lz_repsearch() and also use for LZMS
Eric Biggers [Fri, 29 Aug 2014 03:31:13 +0000 (22:31 -0500)]
Factor out lz_repsearch() and also use for LZMS

5 years agoUpdate NEWS
Eric Biggers [Fri, 29 Aug 2014 00:50:39 +0000 (19:50 -0500)]
Update NEWS

5 years agoMerge branch 'wimboot_fast'
Eric Biggers [Fri, 29 Aug 2014 00:45:34 +0000 (19:45 -0500)]
Merge branch 'wimboot_fast'

5 years agowin32_apply.c: set_short_name(): Zero buffer
Eric Biggers [Thu, 28 Aug 2014 07:06:39 +0000 (02:06 -0500)]
win32_apply.c: set_short_name(): Zero buffer

5 years agowin32_apply.c: set_short_name(): Zero buffer
Eric Biggers [Thu, 28 Aug 2014 07:06:39 +0000 (02:06 -0500)]
win32_apply.c: set_short_name(): Zero buffer

5 years agoMerge remote-tracking branch 'origin/master' into wimboot_fast
Eric Biggers [Thu, 28 Aug 2014 02:53:02 +0000 (21:53 -0500)]
Merge remote-tracking branch 'origin/master' into wimboot_fast

5 years agoSupport file counts for extract file structure and metadata progress
Eric Biggers [Thu, 28 Aug 2014 02:41:39 +0000 (21:41 -0500)]
Support file counts for extract file structure and metadata progress

5 years agoFix [PrepopulateList] handling
Eric Biggers [Thu, 28 Aug 2014 00:56:12 +0000 (19:56 -0500)]
Fix [PrepopulateList] handling

5 years agowimboot_set_pointer(): No unnecessary file open
Eric Biggers [Wed, 27 Aug 2014 04:09:18 +0000 (23:09 -0500)]
wimboot_set_pointer(): No unnecessary file open

5 years agoMake generic extraction code aware of external backing and optimize on Win32 side
Eric Biggers [Wed, 27 Aug 2014 03:48:00 +0000 (22:48 -0500)]
Make generic extraction code aware of external backing and optimize on Win32 side

5 years agowin32_apply.c: set_short_name(): Increase minimum buffer size
Eric Biggers [Wed, 27 Aug 2014 01:41:06 +0000 (20:41 -0500)]
win32_apply.c:  set_short_name(): Increase minimum buffer size

5 years agoUpdate NEWS
Eric Biggers [Sun, 24 Aug 2014 22:44:29 +0000 (17:44 -0500)]
Update NEWS

5 years agolzx-compress.c: Faster extension of repeat offset matches
Eric Biggers [Sat, 23 Aug 2014 17:53:49 +0000 (12:53 -0500)]
lzx-compress.c: Faster extension of repeat offset matches

5 years agoxpress-compress.c: Adjust condition for using binary tree matchfinder
Eric Biggers [Thu, 21 Aug 2014 04:59:12 +0000 (23:59 -0500)]
xpress-compress.c: Adjust condition for using binary tree matchfinder

5 years agowimlib_get_error_string(): Fix return value for some invalid numbers
Eric Biggers [Thu, 21 Aug 2014 04:41:27 +0000 (23:41 -0500)]
wimlib_get_error_string(): Fix return value for some invalid numbers

The function was returning NULL for unknown error codes in the range of the
array.  But it should return "Unknown error" for such codes.

5 years agowimlib.h: Various minor doc improvements
Eric Biggers [Thu, 21 Aug 2014 04:20:44 +0000 (23:20 -0500)]
wimlib.h:  Various minor doc improvements

5 years agowimlib_get_compressor_needed_memory(): return 0 on invalid max_block_size
Eric Biggers [Wed, 20 Aug 2014 02:35:51 +0000 (21:35 -0500)]
wimlib_get_compressor_needed_memory(): return 0 on invalid max_block_size

5 years agoMake create_decompressor() checks of max_block_size consistent
Eric Biggers [Wed, 20 Aug 2014 02:17:29 +0000 (21:17 -0500)]
Make create_decompressor() checks of max_block_size consistent

5 years agowimlib_create_{de,}compressor(): Check ctype first
Eric Biggers [Wed, 20 Aug 2014 02:04:39 +0000 (21:04 -0500)]
wimlib_create_{de,}compressor(): Check ctype first

5 years agowimlib_create_decompressor(): Fail if max_block_size == 0
Eric Biggers [Wed, 20 Aug 2014 02:03:58 +0000 (21:03 -0500)]
wimlib_create_decompressor(): Fail if max_block_size == 0

5 years agowimlib.h: Improve documentation for compression API
Eric Biggers [Wed, 20 Aug 2014 01:39:38 +0000 (20:39 -0500)]
wimlib.h: Improve documentation for compression API

5 years agoLZX: Allow max_block_size not a power of 2
Eric Biggers [Tue, 19 Aug 2014 03:48:53 +0000 (22:48 -0500)]
LZX: Allow max_block_size not a power of 2

This should be treated as an internal of LZX.

5 years agowimlib_decompress(): Check uncompressed_size
Eric Biggers [Tue, 19 Aug 2014 03:45:47 +0000 (22:45 -0500)]
wimlib_decompress(): Check uncompressed_size

5 years agolz_*.c: Use UINT32_MAX for default max_match_len
Eric Biggers [Tue, 19 Aug 2014 03:41:34 +0000 (22:41 -0500)]
lz_*.c: Use UINT32_MAX for default max_match_len

This avoids max_match_len < min_match_len on extremely small windows.

5 years agowimlib_compress(): Return 0 if uncompressed_size is invalid
Eric Biggers [Tue, 19 Aug 2014 03:38:48 +0000 (22:38 -0500)]
wimlib_compress(): Return 0 if uncompressed_size is invalid

5 years agowin32_apply.c: Use volume handle when enabling short names
Eric Biggers [Sun, 17 Aug 2014 21:58:18 +0000 (16:58 -0500)]
win32_apply.c: Use volume handle when enabling short names

Otherwise it doesn't work.

5 years agowin32_apply.c: Adjust short name behavior
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.

5 years agoxpress-decompress.c: Remove unnecessary bitstream_ensure_bits()
Eric Biggers [Sun, 17 Aug 2014 05:33:47 +0000 (00:33 -0500)]
xpress-decompress.c: Remove unnecessary bitstream_ensure_bits()

5 years agoLZX, XPRESS: Use optimized write_bits() functions
Eric Biggers [Sun, 17 Aug 2014 04:11:20 +0000 (23:11 -0500)]
LZX, XPRESS: Use optimized write_bits() functions

For LZX, no handling of literal bytes is needed.  Also, no padding at the end is
needed; omitting it improves the compression ratio slightly.

For XPRESS, no handling of bit counts > 16 is needed.

5 years agoRate limit VERIFY_STREAMS progress messages
Eric Biggers [Sat, 16 Aug 2014 17:37:58 +0000 (12:37 -0500)]
Rate limit VERIFY_STREAMS progress messages

5 years agowin32_apply.c: Set WimBoot=1 in extracted registry
Eric Biggers [Sat, 16 Aug 2014 15:59:11 +0000 (10:59 -0500)]
win32_apply.c:  Set WimBoot=1 in extracted registry

5 years agoextract.c: Simplify mkdir_if_needed()
Eric Biggers [Sat, 16 Aug 2014 01:01:32 +0000 (20:01 -0500)]
extract.c: Simplify mkdir_if_needed()

Just go ahead and try mkdir().  If it works or it fails with EEXIST,
we're done.  (On Windows, a quirk also requires a check for EACCES.)

This aoids the need to call tstat(), which on Windows was really
_wstat(), which is horribly broken: it will fail on paths ending in a
slash.

5 years agoREADME: update COMPRESSION RATIO section
Eric Biggers [Sat, 16 Aug 2014 00:36:13 +0000 (19:36 -0500)]
README: update COMPRESSION RATIO section

5 years agoSet version to 1.7.2-BETA
Eric Biggers [Fri, 15 Aug 2014 02:48:18 +0000 (21:48 -0500)]
Set version to 1.7.2-BETA

5 years agoMore lz_hash_chains, lz_binary_trees performance improvements
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.

6 years agodebian/control: Fix Depends
Eric Biggers [Thu, 7 Aug 2014 05:05:43 +0000 (00:05 -0500)]
debian/control: Fix Depends

6 years agontfs-3g_capture.c: ntfs_get_ntfs_attrib() gets cpu-endian value
Eric Biggers [Thu, 7 Aug 2014 04:32:41 +0000 (23:32 -0500)]
ntfs-3g_capture.c: ntfs_get_ntfs_attrib() gets cpu-endian value

6 years agov1.7.1 v1.7.1
Eric Biggers [Thu, 7 Aug 2014 03:36:38 +0000 (22:36 -0500)]
v1.7.1

6 years agodecompress_common.c: Don't include error.h
Eric Biggers [Thu, 7 Aug 2014 03:13:36 +0000 (22:13 -0500)]
decompress_common.c: Don't include error.h

6 years agolzx-common.c: Use sle32 for target in e8 translation
Eric Biggers [Thu, 7 Aug 2014 02:50:36 +0000 (21:50 -0500)]
lzx-common.c: Use sle32 for target in e8 translation

6 years agoDelete useless 1-byte explicit endian types
Eric Biggers [Thu, 7 Aug 2014 02:50:04 +0000 (21:50 -0500)]
Delete useless 1-byte explicit endian types

6 years agoAdd sparse annotations for endianness checking
Eric Biggers [Thu, 7 Aug 2014 02:48:41 +0000 (21:48 -0500)]
Add sparse annotations for endianness checking

6 years agoUpdate README and README.WINDOWS
Eric Biggers [Wed, 6 Aug 2014 23:58:10 +0000 (18:58 -0500)]
Update README and README.WINDOWS

6 years agoLZX decompression: Cleanup
Eric Biggers [Wed, 6 Aug 2014 03:26:38 +0000 (22:26 -0500)]
LZX decompression:  Cleanup

No change in behavior.

6 years agomount_image.c: Cleanup
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

6 years agoread_wim_header(): Check return value of lseek()
Eric Biggers [Tue, 5 Aug 2014 02:16:46 +0000 (21:16 -0500)]
read_wim_header(): Check return value of lseek()

6 years agontfs-3g_capture.c: Remove a never-executed statement
Eric Biggers [Tue, 5 Aug 2014 02:07:07 +0000 (21:07 -0500)]
ntfs-3g_capture.c: Remove a never-executed statement

6 years agocapture_common.c: Add missing breaks in switch stmt in do_capture_progress()
Eric Biggers [Tue, 5 Aug 2014 02:02:14 +0000 (21:02 -0500)]
capture_common.c: Add missing breaks in switch stmt in do_capture_progress()

No effect because EXCLUDE_VERBOSE is set whenever VERBOSE is, but these
should be there.

6 years agoextract.c: Fix dereference of NULL in memory exhausted path
Eric Biggers [Tue, 5 Aug 2014 01:57:03 +0000 (20:57 -0500)]
extract.c: Fix dereference of NULL in memory exhausted path

found_lte can be NULL here if the call to new_lookup_table_entry()
failed.

6 years agowrite.c: Fix handling of NULL context in stream_filtered()
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.

6 years agowim.h: Delete prototype for nonexistent function close_wim()
Eric Biggers [Sun, 3 Aug 2014 23:46:11 +0000 (18:46 -0500)]
wim.h: Delete prototype for nonexistent function close_wim()

6 years agowin32_common.c: Remove code for windows version detection
Eric Biggers [Sun, 3 Aug 2014 23:41:11 +0000 (18:41 -0500)]
win32_common.c:  Remove code for windows version detection

This isn't used by anything anymore.

6 years agoxpress.h: Remove ENABLE_XPRESS_DEBUG
Eric Biggers [Sun, 3 Aug 2014 23:37:36 +0000 (18:37 -0500)]
xpress.h: Remove ENABLE_XPRESS_DEBUG

Neither XPRESS_DEBUG() nor XPRESS_ASSERT() is used anymore.

6 years agodebian/: wimlib9 => wimlib15
Eric Biggers [Sun, 3 Aug 2014 23:24:51 +0000 (18:24 -0500)]
debian/: wimlib9 => wimlib15

Should have been done for 1.7.0.

6 years agolzms-compress.c: Fix crash on compression levels 1 through 4
Eric Biggers [Sat, 2 Aug 2014 14:19:54 +0000 (09:19 -0500)]
lzms-compress.c: Fix crash on compression levels 1 through 4

lzms_get_near_optimal_item() assumes that nice_match_length >=
min_match_length.

6 years agoextract.c: Fix yet another bug in many-identical-streams case
Eric Biggers [Sat, 2 Aug 2014 02:33:33 +0000 (21:33 -0500)]
extract.c: Fix yet another bug in many-identical-streams case

6 years agowimlib.h: Update wimlib_create_compressor() docs
Eric Biggers [Sat, 2 Aug 2014 02:12:24 +0000 (21:12 -0500)]
wimlib.h: Update wimlib_create_compressor() docs

6 years agowin32_capture.c: Ignore unnamed data stream of reparse point
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.

6 years agoAdd WIMLIB_PROGRESS_MSG_EXTRACT_{FILE_STRUCTURE,METADATA}
Eric Biggers [Tue, 29 Jul 2014 02:12:25 +0000 (21:12 -0500)]
Add WIMLIB_PROGRESS_MSG_EXTRACT_{FILE_STRUCTURE,METADATA}

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.

6 years agodecompress_common.h: Add back check for buffer overrun
Eric Biggers [Tue, 29 Jul 2014 02:30:56 +0000 (21:30 -0500)]
decompress_common.h: Add back check for buffer overrun

This got lost by commit 8e9c6b63fcba9406cea6b742859e7730e0e2e8a9 two days
ago.  This check is still needed, unfortunately.

The unrolled loop and is_constant() optimization still helps a bit, but
not as much now.

6 years agowimlib-imagex.1: Mention 'verify' subcommand
Eric Biggers [Mon, 28 Jul 2014 03:39:46 +0000 (22:39 -0500)]
wimlib-imagex.1: Mention 'verify' subcommand

6 years agoextract.c: Fix extract_from_tmpfile()
Eric Biggers [Mon, 28 Jul 2014 03:28:06 +0000 (22:28 -0500)]
extract.c: Fix extract_from_tmpfile()

6 years agoAbbreviate the NEWS a bit
Eric Biggers [Mon, 28 Jul 2014 03:08:38 +0000 (22:08 -0500)]
Abbreviate the NEWS a bit

6 years agoAdd 'wimlib-imagex verify' command
Eric Biggers [Mon, 28 Jul 2014 03:02:28 +0000 (22:02 -0500)]
Add 'wimlib-imagex verify' command

6 years agoAdd wimlib_verify_wim()
Eric Biggers [Mon, 28 Jul 2014 02:38:16 +0000 (21:38 -0500)]
Add wimlib_verify_wim()

6 years agoAdd sprint_hash()
Eric Biggers [Sun, 27 Jul 2014 23:50:46 +0000 (18:50 -0500)]
Add sprint_hash()

Delete print_hash() and get_sha1_string()

6 years agowimlib-imagex.1: Update license statement
Eric Biggers [Sun, 27 Jul 2014 19:18:44 +0000 (14:18 -0500)]
wimlib-imagex.1: Update license statement

6 years agoUpdate COMPRESSION RATIO section in README
Eric Biggers [Sun, 27 Jul 2014 18:47:29 +0000 (13:47 -0500)]
Update COMPRESSION RATIO section in README

6 years agolzx-compress.c: Update some comments
Eric Biggers [Sun, 27 Jul 2014 16:11:26 +0000 (11:11 -0500)]
lzx-compress.c: Update some comments

6 years agolzx-compress.c: Don't update recent offset queue unnecessarily
Eric Biggers [Sun, 27 Jul 2014 03:13:26 +0000 (22:13 -0500)]
lzx-compress.c: Don't update recent offset queue unnecessarily

6 years agolzx-compress.c: Speed up rep match cost evaluations
Eric Biggers [Sun, 27 Jul 2014 02:11:31 +0000 (21:11 -0500)]
lzx-compress.c: Speed up rep match cost evaluations

6 years agolzx-compress.c: Use local variable for 'optimum' pointer
Eric Biggers [Sun, 27 Jul 2014 01:32:13 +0000 (20:32 -0500)]
lzx-compress.c: Use local variable for 'optimum' pointer

6 years agodecompress_common.h: Optimize bitstream_ensure_bits()
Eric Biggers [Sat, 26 Jul 2014 23:38:08 +0000 (18:38 -0500)]
decompress_common.h: Optimize bitstream_ensure_bits()

6 years agolz_binary_trees.c: Avoid buffer overrun if min_match_len > 3
Eric Biggers [Sat, 26 Jul 2014 18:46:54 +0000 (13:46 -0500)]
lz_binary_trees.c: Avoid buffer overrun if min_match_len > 3

6 years agolz_hash_chains.c: Avoid buffer overrun if min_match_len > 3
Eric Biggers [Sat, 26 Jul 2014 18:36:31 +0000 (13:36 -0500)]
lz_hash_chains.c: Avoid buffer overrun if min_match_len > 3

6 years agoxpress-compress.c: Use dedicated choose-items function for each parsing strategy
Eric Biggers [Sat, 26 Jul 2014 00:38:20 +0000 (19:38 -0500)]
xpress-compress.c: Use dedicated choose-items function for each parsing strategy

This speeds up lazy and greedy parsing.

6 years agolz_hash_chains.c: Add some comments to lz_hc_get_matches()
Eric Biggers [Sat, 26 Jul 2014 15:42:57 +0000 (10:42 -0500)]
lz_hash_chains.c:  Add some comments to lz_hc_get_matches()

6 years agolz_hash_chains.c: Hand-inline do_search()
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.

6 years agoUpdate NEWS
Eric Biggers [Sat, 26 Jul 2014 13:14:58 +0000 (08:14 -0500)]
Update NEWS

6 years agolzms-common.c: Don't process first byte in x86 filter
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.

6 years agolzms-common.c: Add comment to lzms_x86_filter()
Eric Biggers [Sat, 26 Jul 2014 05:44:29 +0000 (00:44 -0500)]
lzms-common.c: Add comment to lzms_x86_filter()