wimlib
7 years agolzx-compress.c: Rename lzx_record_ctx.matches
Eric Biggers [Sat, 5 Jul 2014 19:17:30 +0000 (14:17 -0500)]
lzx-compress.c: Rename lzx_record_ctx.matches

7 years agolzx-compress.c: Rename lzx_write_matches_and_literals()
Eric Biggers [Sat, 5 Jul 2014 19:13:40 +0000 (14:13 -0500)]
lzx-compress.c: Rename lzx_write_matches_and_literals()

7 years ago{lzx,lzms}-decompress.c: Include wimlib/error.h, not wimlib.h
Eric Biggers [Sat, 5 Jul 2014 02:54:41 +0000 (21:54 -0500)]
{lzx,lzms}-decompress.c: Include wimlib/error.h, not wimlib.h

7 years agoxpress-decompress.c: Remove unneeded wimlib.h include
Eric Biggers [Sat, 5 Jul 2014 02:53:05 +0000 (21:53 -0500)]
xpress-decompress.c: Remove unneeded wimlib.h include

7 years ago{de,}compressor_ops.h: Forward declare params header
Eric Biggers [Sat, 5 Jul 2014 02:51:35 +0000 (21:51 -0500)]
{de,}compressor_ops.h: Forward declare params header

7 years agoxpress-compress.c: Rename xpress_match => xpress_item
Eric Biggers [Sat, 5 Jul 2014 02:22:01 +0000 (21:22 -0500)]
xpress-compress.c: Rename xpress_match => xpress_item

7 years agolzx-compress.c: Minor cleanups
Eric Biggers [Sat, 5 Jul 2014 02:11:12 +0000 (21:11 -0500)]
lzx-compress.c: Minor cleanups

7 years agoGet rid of input_idx_t
Eric Biggers [Sat, 5 Jul 2014 01:53:23 +0000 (20:53 -0500)]
Get rid of input_idx_t

This can't simply be changed anymore, so there's not much point in having
it.  For now window sizes are fixed at 32 bits.

7 years agoRename raw_match => lz_match
Eric Biggers [Sat, 5 Jul 2014 01:41:53 +0000 (20:41 -0500)]
Rename raw_match => lz_match

7 years agolzx-compress.c: Rename lzx_match => lzx_item
Eric Biggers [Sat, 5 Jul 2014 01:34:34 +0000 (20:34 -0500)]
lzx-compress.c: Rename lzx_match => lzx_item

An LZX item can be a match or a literal.  This makes more sense than "a
LZX match can be a match or a literal".

7 years agoEnsure WIM has filename before doing WIMBoot extraction
Eric Biggers [Fri, 4 Jul 2014 02:00:00 +0000 (21:00 -0500)]
Ensure WIM has filename before doing WIMBoot extraction

7 years agowimboot.c: Set correct error code if rename fails
Eric Biggers [Fri, 4 Jul 2014 01:57:00 +0000 (20:57 -0500)]
wimboot.c: Set correct error code if rename fails

7 years agowin32_apply.c: Minor cleanups
Eric Biggers [Fri, 4 Jul 2014 01:37:06 +0000 (20:37 -0500)]
win32_apply.c: Minor cleanups

7 years agoPlace headers that could be useful in unrelated projects in public domain
Eric Biggers [Fri, 4 Jul 2014 00:04:23 +0000 (19:04 -0500)]
Place headers that could be useful in unrelated projects in public domain

7 years agolzms-decompress.c: Update comments about Huffman codes
Eric Biggers [Thu, 3 Jul 2014 23:51:18 +0000 (18:51 -0500)]
lzms-decompress.c: Update comments about Huffman codes

Make consistent with the observations in compress_common.c

7 years agoPlace common decompression/compression code in public domain
Eric Biggers [Thu, 3 Jul 2014 23:25:13 +0000 (18:25 -0500)]
Place common decompression/compression code in public domain

Not much except Huffman coding in these files anymore, and that should be
completely free especially since it's been over 60 years since it was
invented...

7 years agowin32_capture.c: Fix exclusion when capture path ends in slash
Eric Biggers [Sat, 28 Jun 2014 23:32:32 +0000 (18:32 -0500)]
win32_capture.c:  Fix exclusion when capture path ends in slash

Broken by e9aed5bf5c3296f35ff7007cb1702c07b7dc2b37

7 years agodoc updates
Eric Biggers [Fri, 27 Jun 2014 23:46:04 +0000 (18:46 -0500)]
doc updates

7 years agoWindows replacement for fopen(path, "a")
Eric Biggers [Thu, 26 Jun 2014 01:03:50 +0000 (20:03 -0500)]
Windows replacement for fopen(path, "a")

7 years agoUse tchar for error file path
Eric Biggers [Thu, 26 Jun 2014 00:47:40 +0000 (19:47 -0500)]
Use tchar for error file path

7 years agowin32_capture.c: Exclude files pending deletion
Eric Biggers [Thu, 26 Jun 2014 00:43:00 +0000 (19:43 -0500)]
win32_capture.c: Exclude files pending deletion

7 years agowimexport: Add --recompress option
Eric Biggers [Wed, 25 Jun 2014 02:48:43 +0000 (21:48 -0500)]
wimexport: Add --recompress option

7 years agoClose error file opened by name
Eric Biggers [Wed, 25 Jun 2014 02:39:08 +0000 (21:39 -0500)]
Close error file opened by name

7 years agowimlib: Allow custom error file
Eric Biggers [Wed, 25 Jun 2014 02:12:44 +0000 (21:12 -0500)]
wimlib: Allow custom error file

7 years agoUse completed_streams and total_streams in extract progress
Eric Biggers [Wed, 25 Jun 2014 01:46:03 +0000 (20:46 -0500)]
Use completed_streams and total_streams in extract progress

7 years agoRemove begin_stream callback flags
Eric Biggers [Wed, 25 Jun 2014 01:13:33 +0000 (20:13 -0500)]
Remove begin_stream callback flags

These aren't used for anything anymore.

7 years agoextract.c: Pass orig stream to callbacks when reading tmpfile
Eric Biggers [Wed, 25 Jun 2014 01:08:39 +0000 (20:08 -0500)]
extract.c: Pass orig stream to callbacks when reading tmpfile

Needed for "WIMBoot" extraction

7 years agowin32_apply.c: Don't use BEGIN_STREAM_STATUS_SKIP_STREAM
Eric Biggers [Tue, 24 Jun 2014 01:04:57 +0000 (20:04 -0500)]
win32_apply.c:  Don't use BEGIN_STREAM_STATUS_SKIP_STREAM

This doesn't work correctly when extracting the stream from a pipe or a
solid block.  Just read the data and don't do anything with it --- at
least this double checks that it's actually valid.

7 years agoextract.c: Send "extract streams" progress at least every 5 MB
Eric Biggers [Tue, 24 Jun 2014 00:47:37 +0000 (19:47 -0500)]
extract.c: Send "extract streams" progress at least every 5 MB

7 years agoAdd experimental support for WIMLIB_PROGRESS_MSG_DONE_WITH_FILE
Eric Biggers [Sun, 22 Jun 2014 04:41:05 +0000 (23:41 -0500)]
Add experimental support for WIMLIB_PROGRESS_MSG_DONE_WITH_FILE

7 years agoUpdate NEWS
Eric Biggers [Sat, 21 Jun 2014 21:09:25 +0000 (16:09 -0500)]
Update NEWS

7 years agoFactor out Win32 => NT path conversion and use in win32_capture.c
Eric Biggers [Sat, 21 Jun 2014 21:06:00 +0000 (16:06 -0500)]
Factor out Win32 => NT path conversion and use in win32_capture.c

7 years agowin32_capture.c: Don't add duplicate backslashes
Eric Biggers [Sat, 21 Jun 2014 21:05:00 +0000 (16:05 -0500)]
win32_capture.c: Don't add duplicate backslashes

7 years agowrite.c: Send "write streams" progress at least every 5 MB
Eric Biggers [Sat, 21 Jun 2014 20:01:09 +0000 (15:01 -0500)]
write.c: Send "write streams" progress at least every 5 MB

This is helpful when writing large archives, especially when the library
user uses the ability to abort the operation.

7 years agoextract.c: Fix for running out of file handles
Eric Biggers [Fri, 20 Jun 2014 04:58:43 +0000 (23:58 -0500)]
extract.c: Fix for running out of file handles

7 years agoUpdate version to v1.7.1-BETA
Eric Biggers [Fri, 20 Jun 2014 00:35:27 +0000 (19:35 -0500)]
Update version to v1.7.1-BETA

7 years agoAllow multiple wimlib_global_init/cleanup per app
Eric Biggers [Fri, 20 Jun 2014 00:32:36 +0000 (19:32 -0500)]
Allow multiple wimlib_global_init/cleanup per app

7 years agosecurity.c: Use int32_t for security IDs
Eric Biggers [Thu, 19 Jun 2014 03:10:34 +0000 (22:10 -0500)]
security.c: Use int32_t for security IDs

7 years agov1.7.0 v1.7.0
Eric Biggers [Tue, 17 Jun 2014 00:28:40 +0000 (19:28 -0500)]
v1.7.0

7 years agoimagex-optimize.1.in: Update LZX compressor note
Eric Biggers [Tue, 17 Jun 2014 01:48:47 +0000 (20:48 -0500)]
imagex-optimize.1.in:  Update LZX compressor note

7 years agoREADME: Update COMPRESSION RATIO section
Eric Biggers [Tue, 17 Jun 2014 01:45:54 +0000 (20:45 -0500)]
README: Update COMPRESSION RATIO section

7 years agosha1-ssse3.asm: Fix building on Windows
Eric Biggers [Mon, 16 Jun 2014 02:49:27 +0000 (21:49 -0500)]
sha1-ssse3.asm:  Fix building on Windows

For some reason the Intel original doesn't actually build for Windows
because it requests too high alignment per section.  It should be
sufficient to retain the alignment directives in the code itself.

7 years agomake-windows-release: Allow multiple extra args to configure
Eric Biggers [Mon, 16 Jun 2014 02:16:14 +0000 (21:16 -0500)]
make-windows-release: Allow multiple extra args to configure

7 years agomake-windows-release: Set VERSION correctly for betas
Eric Biggers [Mon, 16 Jun 2014 02:11:01 +0000 (21:11 -0500)]
make-windows-release: Set VERSION correctly for betas

7 years agoRe-visit SHA-1 code
Eric Biggers [Sun, 15 Jun 2014 16:34:57 +0000 (11:34 -0500)]
Re-visit SHA-1 code

- Fixed build failures when configured with --enable-ssse3-sha1.

- Actually calculate the message digest correctly in the SSSE3-optimized
  version!  The Intel code just does block transformations, not arbitrary
  updates; the previous code did not reflect this.

- Use an appropriate fallback when the CPU does not support SSSE3
  instructions; don't just call abort()!

- Improve sha1_update() and sha1_final().  They should now be slightly
  faster, as well as easier to understand.

- Use beXX_to_cpu() and cpu_to_beXX() macros instead of hard-coding
  endian conversions.

7 years agoavl_tree.c: Remove avl_set_balance_factor()
Eric Biggers [Sun, 15 Jun 2014 05:15:24 +0000 (00:15 -0500)]
avl_tree.c: Remove avl_set_balance_factor()

7 years agoSpeed up LZ77 match copying
Eric Biggers [Sat, 14 Jun 2014 20:44:47 +0000 (15:44 -0500)]
Speed up LZ77 match copying

7 years agoxpress-decompress.c: Store 'len_hdr' and 'offset_bsr' in unsigned ints
Eric Biggers [Sat, 14 Jun 2014 17:16:11 +0000 (12:16 -0500)]
xpress-decompress.c:  Store 'len_hdr' and 'offset_bsr' in unsigned ints

This speeds up XPRESS decompression by about 2%.

7 years agofinish_write(): Read old integrity table into memory if needed
Eric Biggers [Sat, 14 Jun 2014 06:10:45 +0000 (01:10 -0500)]
finish_write():  Read old integrity table into memory if needed

This is a better fix for the problem, since it doesn't prevent the old
table from being used when it can be.

7 years agofinish_write(): Don't use old integrity table if already overwritten
Eric Biggers [Sat, 14 Jun 2014 04:46:58 +0000 (23:46 -0500)]
finish_write(): Don't use old integrity table if already overwritten

When updating a WIM in-place without modifying the lookup table, the new
XML data will spill into the old integrity table if the new XML data is
longer than the old XML data.  Temporarily fix this by not using the old
integrity table in this case.

7 years agoextract.c: Don't compile unneeded code when WITH_NTFS_3G undefined
Eric Biggers [Sat, 14 Jun 2014 04:45:56 +0000 (23:45 -0500)]
extract.c: Don't compile unneeded code when WITH_NTFS_3G undefined

7 years agoextract.c: Do endian conversion when checking pipable WIM header
Eric Biggers [Sat, 14 Jun 2014 04:44:01 +0000 (23:44 -0500)]
extract.c: Do endian conversion when checking pipable WIM header

7 years agodentry.c: Cast name length u16 => u32 whenever adding 2
Eric Biggers [Sat, 14 Jun 2014 04:41:22 +0000 (23:41 -0500)]
dentry.c:  Cast name length u16 => u32 whenever adding 2

Due to integer promotion this won't make a difference if an 'int' is 4+
bytes anyway, but make the intention clear: this computation should not
overflow.

7 years agoread_dentry_tree(): Use dentry_set_name()
Eric Biggers [Sat, 14 Jun 2014 04:40:34 +0000 (23:40 -0500)]
read_dentry_tree(): Use dentry_set_name()

Does the same thing but is shorter.

7 years agocompress_serial.c: Don't store compressed length in context
Eric Biggers [Sat, 14 Jun 2014 04:39:35 +0000 (23:39 -0500)]
compress_serial.c:  Don't store compressed length in context

It can be a local variable.

7 years agocompress_parallel.c: Don't bail if not all threads can be created
Eric Biggers [Sat, 14 Jun 2014 04:39:00 +0000 (23:39 -0500)]
compress_parallel.c:  Don't bail if not all threads can be created

If pthread_create() fails but at least 2 threads were created, use them
instead of falling back to serial compression.

7 years agocompress_parallel.c: Use more appropriate type for shift
Eric Biggers [Sat, 14 Jun 2014 04:37:37 +0000 (23:37 -0500)]
compress_parallel.c: Use more appropriate type for shift

7 years agochunk_compressor: Use u32 for chunk uncompressed size
Eric Biggers [Sat, 14 Jun 2014 04:36:09 +0000 (23:36 -0500)]
chunk_compressor: Use u32 for chunk uncompressed size

All chunk sizes must fit in a 32-bit integer because they cannot exceed
'out_chunk_size'.

7 years agomake_canonical_huffman_code(): Stricter validation of max_codeword_len
Eric Biggers [Sat, 14 Jun 2014 04:33:08 +0000 (23:33 -0500)]
make_canonical_huffman_code():  Stricter validation of max_codeword_len

max_codeword_len must be long enough to give a distinct codeword to each
symbol.  As we also check that num_syms >= 2, use this check instead of
max_codeword_len > 0.

7 years agocompress.c: Always include base compressor size
Eric Biggers [Sat, 14 Jun 2014 04:31:33 +0000 (23:31 -0500)]
compress.c:  Always include base compressor size

When the struct compressor_ops does not provide get_needed_memory(),
still include the size of the struct wimlib_compressor.

7 years ago{de,}compress.c: Sort ops by type number
Eric Biggers [Sat, 14 Jun 2014 04:30:24 +0000 (23:30 -0500)]
{de,}compress.c: Sort ops by type number

7 years agocapture_common.c: Fix comment
Eric Biggers [Sat, 14 Jun 2014 04:29:28 +0000 (23:29 -0500)]
capture_common.c: Fix comment

7 years agoUpdate NEWS
Eric Biggers [Fri, 13 Jun 2014 04:54:24 +0000 (23:54 -0500)]
Update NEWS

7 years agodentry.c: Fix comment
Eric Biggers [Fri, 13 Jun 2014 04:34:39 +0000 (23:34 -0500)]
dentry.c: Fix comment

7 years agowimlib.h: Make beginning of docs a bit more friendly
Eric Biggers [Fri, 13 Jun 2014 04:24:36 +0000 (23:24 -0500)]
wimlib.h:  Make beginning of docs a bit more friendly

7 years agowimlib.h: Update docs
Eric Biggers [Fri, 13 Jun 2014 04:05:54 +0000 (23:05 -0500)]
wimlib.h: Update docs

7 years agoRemove WIMLIB_COMPRESSION_TYPE_INVALID from library
Eric Biggers [Fri, 13 Jun 2014 04:04:05 +0000 (23:04 -0500)]
Remove WIMLIB_COMPRESSION_TYPE_INVALID from library

This is actually only used in wimlib-imagex

7 years agowimlib_get_compressor_needed_memory(): Include struct wimlib_compressor
Eric Biggers [Fri, 13 Jun 2014 04:00:22 +0000 (23:00 -0500)]
wimlib_get_compressor_needed_memory(): Include struct wimlib_compressor

7 years agomake-windows-release: Include all COPYING files
Eric Biggers [Fri, 13 Jun 2014 01:43:22 +0000 (20:43 -0500)]
make-windows-release: Include all COPYING files

7 years agoUpdate Makefile.am
Eric Biggers [Fri, 13 Jun 2014 01:34:27 +0000 (20:34 -0500)]
Update Makefile.am

7 years agoUpdate Linux packaging
Eric Biggers [Fri, 13 Jun 2014 01:24:50 +0000 (20:24 -0500)]
Update Linux packaging

7 years agoUpdate README
Eric Biggers [Fri, 13 Jun 2014 01:22:49 +0000 (20:22 -0500)]
Update README

7 years agoUpdate library license: Add LGPLv3 exception
Eric Biggers [Fri, 13 Jun 2014 01:21:16 +0000 (20:21 -0500)]
Update library license: Add LGPLv3 exception

7 years agoPlace programs in examples/ in public domain
Eric Biggers [Fri, 13 Jun 2014 01:17:28 +0000 (20:17 -0500)]
Place programs in examples/ in public domain

7 years agolzms-compress.c: Don't do redundant work in cost calculations
Eric Biggers [Thu, 12 Jun 2014 05:17:37 +0000 (00:17 -0500)]
lzms-compress.c: Don't do redundant work in cost calculations

7 years agolzx-compress.c: Don't compute match/literal array before actually needed
Eric Biggers [Thu, 12 Jun 2014 03:42:46 +0000 (22:42 -0500)]
lzx-compress.c:  Don't compute match/literal array before actually needed

7 years agolzx-compress.c: Don't do redundant work in cost calculations
Eric Biggers [Thu, 12 Jun 2014 03:39:29 +0000 (22:39 -0500)]
lzx-compress.c:  Don't do redundant work in cost calculations

7 years agolzx.h: Align 'struct lzx_lru_queue' on x86_64
Eric Biggers [Thu, 12 Jun 2014 03:34:33 +0000 (22:34 -0500)]
lzx.h: Align 'struct lzx_lru_queue' on x86_64

7 years ago{lzx,lzms-decompress.c}: Allocate context with DECODE_TABLE_ALIGNMENT
Eric Biggers [Thu, 12 Jun 2014 04:19:08 +0000 (23:19 -0500)]
{lzx,lzms-decompress.c}: Allocate context with DECODE_TABLE_ALIGNMENT

7 years agoAdd aligned malloc and free
Eric Biggers [Thu, 12 Jun 2014 04:15:40 +0000 (23:15 -0500)]
Add aligned malloc and free

Don't make dependent on OS support, since that would break the custom
memory allocation functions and also would need to be different between
UNIX and Windows anyway.

7 years agoxml.c: Don't count reparse point data and directory streams in <TOTALBYTES>
Eric Biggers [Wed, 11 Jun 2014 02:32:38 +0000 (21:32 -0500)]
xml.c: Don't count reparse point data and directory streams in <TOTALBYTES>

7 years agoDon't exclude out-of-tree absolute symlinks in reparse point fix mode
Eric Biggers [Wed, 11 Jun 2014 01:55:10 +0000 (20:55 -0500)]
Don't exclude out-of-tree absolute symlinks in reparse point fix mode

Excluding such links may not be the expected behavior.  In addition,
Microsoft's documentation for ImageX seems to be incorrect when it states
that ImageX excludes such links.  Actually, it does not.  So, for the
sake of consistency and also doing something that may more sense anyway,
just retain such links, but leave their targets as-is.

7 years agowin32_apply.c: Fix reparse point fixup of device-direct links (no trailing slash)
Eric Biggers [Wed, 11 Jun 2014 01:40:46 +0000 (20:40 -0500)]
win32_apply.c: Fix reparse point fixup of device-direct links (no trailing slash)

After extraction these should point to the capture directory.

This was broken in 1.6.2 as well, but in a different way!

7 years agounix_apply.c: Honor i_not_rpfixed
Eric Biggers [Wed, 11 Jun 2014 01:20:56 +0000 (20:20 -0500)]
unix_apply.c: Honor i_not_rpfixed

This was a regression from 1.6.2

7 years agoextract.c: Remove unused internal flag
Eric Biggers [Sun, 8 Jun 2014 14:56:54 +0000 (09:56 -0500)]
extract.c: Remove unused internal flag

7 years agoRemove some dead assignments
Eric Biggers [Sun, 8 Jun 2014 03:43:00 +0000 (22:43 -0500)]
Remove some dead assignments

7 years agomount_image.c: Don't pass NULL to mq_send()
Eric Biggers [Sun, 8 Jun 2014 03:28:30 +0000 (22:28 -0500)]
mount_image.c: Don't pass NULL to mq_send()

7 years agoxpress-decompress.c: Remove unused 'lens' parameter to xpress_lz_decode()
Eric Biggers [Sun, 8 Jun 2014 03:25:37 +0000 (22:25 -0500)]
xpress-decompress.c: Remove unused 'lens' parameter to xpress_lz_decode()

7 years agowimboot.c, win32_apply.c: Bracket file by #ifdef __WIN32__
Eric Biggers [Sun, 8 Jun 2014 03:16:16 +0000 (22:16 -0500)]
wimboot.c, win32_apply.c:  Bracket file by #ifdef __WIN32__

This makes compiling all non-Windows source files manually (e.g. with
clang-scan-build.sh) easier.

7 years agodecompress_common.c: Add util.h back
Eric Biggers [Sun, 8 Jun 2014 03:15:38 +0000 (22:15 -0500)]
decompress_common.c: Add util.h back

7 years agoUpdate date
Eric Biggers [Sun, 8 Jun 2014 02:36:31 +0000 (21:36 -0500)]
Update date

7 years agolzms-compress.c: Don't underrun window when checking recent offsets
Eric Biggers [Sun, 8 Jun 2014 02:32:06 +0000 (21:32 -0500)]
lzms-compress.c: Don't underrun window when checking recent offsets

In LZMS, not all recent offsets are initialized to 1, unlike in LZX.

7 years agoA few comment fixes
Eric Biggers [Sun, 8 Jun 2014 02:30:10 +0000 (21:30 -0500)]
A few comment fixes

7 years agoRemove a few unnecessary includes
Eric Biggers [Sun, 8 Jun 2014 02:28:22 +0000 (21:28 -0500)]
Remove a few unnecessary includes

7 years agoUpdate public domain dedications
Eric Biggers [Sun, 8 Jun 2014 01:04:23 +0000 (20:04 -0500)]
Update public domain dedications

7 years agowimexport: Document --wimboot option
Eric Biggers [Sat, 7 Jun 2014 22:31:51 +0000 (17:31 -0500)]
wimexport: Document --wimboot option

7 years agowimextract: Rename --no-wildcards to --no-globs; update man page
Eric Biggers [Sat, 7 Jun 2014 22:09:11 +0000 (17:09 -0500)]
wimextract: Rename --no-wildcards to --no-globs; update man page

7 years agowimextract: Suggest --nullglob
Eric Biggers [Sat, 7 Jun 2014 21:54:33 +0000 (16:54 -0500)]
wimextract: Suggest --nullglob

7 years agoUpdate NEWS
Eric Biggers [Sat, 7 Jun 2014 21:48:32 +0000 (16:48 -0500)]
Update NEWS

7 years agolzx-compress.c: Honor cache_limit
Eric Biggers [Sat, 7 Jun 2014 21:46:39 +0000 (16:46 -0500)]
lzx-compress.c:  Honor cache_limit

This ensures the match cache is never overrun.  If for some reason we
average more than LZX_CACHE_PER_POS (currently 8) matches per position,
_excluding skipped positions_, just don't return any more matches.