Commit graph

262 commits

Author SHA1 Message Date
Christian Schneider
bb303564a7 [WIP] Syntax for -lf
TODO: Parse and implement parameter
2017-12-27 11:27:04 +01:00
Christian Schneider
d7a2abe1e9 List default in "preserve extension" syntax 2017-12-27 11:09:22 +01:00
Christian Schneider
dd51283f2c [WIP] No tabs, 2 spaces for indentation 2017-12-26 10:16:33 +01:00
Christian Schneider
1cfd08a703 [WIP] First test of liblzma executable filters
- See issue #75
- Filter maximum is 4, so up to 3 filters + LZMA2 can be used
- X86+PPC+ARM could be a good default
- TODO: Command line parameter so set or disable filters

- Changed VS settings, so unfortunately there are some tab/space changes in here, too.
2017-12-26 09:57:06 +01:00
Christian Schneider
d92cc2d779 Merge branch 'mpais_mtf_heuristic' 2017-12-25 11:15:02 +01:00
Christian Schneider
e63e4898ab Undo context-dependent MTF 2017-12-25 11:14:05 +01:00
Márcio Pais
848c801f23
Bug fix in zLib MTF 2017-12-23 02:38:12 +01:00
Christian Schneider
e77daaf5ad
Merge pull request #70 from kraileth/master
Change Makefiles to be compatible with non-GCC platforms (e.g. FreeBSD)
2017-11-13 07:41:30 +01:00
Michael Reim
581344f7b4 Change Makefiles to be compatible with non-GCC platforms (e.g. FreeBSD) 2017-11-10 16:42:02 +01:00
Márcio Pais
f82156335a
Update precomp.cpp 2017-11-05 20:47:32 +01:00
Márcio Pais
61a6c5ed9e
Tweaked brute mode heuristic 2017-11-05 20:28:15 +01:00
Márcio Pais
ec0a5ae8b3
New brute mode heuristic, context-dependent MTF lists 2017-11-04 20:49:45 +01:00
Márcio Pais
74a431341b
MTF list for zlib parameters
Use an MTF list to keep the possible zlib parameter combinations indexed by recency
2017-10-31 23:08:01 +01:00
Márcio Pais
d585b545be
MTF List class to speed up zlib parameter search 2017-10-31 23:04:40 +01:00
Christian Schneider
22922c3857 Tell install to create $(BINDIR) if it doesn't exist
See issue #68
2017-10-29 08:42:20 +01:00
Christian Schneider
8841ab33e2 Makefile for macOS
should fix #68 and #60
2017-10-29 05:09:24 +01:00
Christian Schneider
206bc0668a Merge branch 'master' of https://github.com/schnaader/precomp-cpp 2017-10-17 11:53:53 +02:00
Christian Schneider
22e5f2b98e Fix issue #65
- Use 64 bit for byte count
- Remove unused parameter
2017-10-11 06:07:18 +02:00
Christian
116d7d981d Makefiles for 32 bit version 2017-09-22 18:55:51 +02:00
Christian Schneider
b643a3cb34 Starting 0.4.7 development 2017-09-21 06:30:26 +02:00
Christian Schneider
eff8288dbc Version 0.4.6 release 2017-09-08 06:32:14 +02:00
Christian Schneider
8adf07ce00 Bugfix for streams bigger than MAX_IO_BUFFER_SIZE 2017-09-04 13:04:44 +02:00
Christian Schneider
57035b5ac4 Bugfix 2017-08-30 17:18:20 +02:00
Christian Schneider
f3244b5f9c Tolerance for identical compressed bytes 2017-08-30 08:17:31 +02:00
Christian Schneider
3709606149 Some fixes
- seek in try_to_decompress is needed
- don't keep on allocating decomp_io_buf memory
2017-08-30 06:46:26 +02:00
Christian Schneider
ec2bb6d231 First test version
- decompress in memory until size exceeds 64 MB
- in recursion, we still use a tempfile
2017-08-29 17:23:15 +02:00
Christian Schneider
36a96bd95e 64 MB I/O buffer not only for JPG 2017-08-28 16:52:47 +02:00
Christian Schneider
ff138f39f7 Merge branch 'master' into intense-mode-speedup 2017-08-24 17:58:02 +02:00
Christian Schneider
cfa602c1ce Better decisions for partial matches
- Ratio of recompressed ratio to decompressed ratio is a good indicator
2017-08-24 07:09:58 +02:00
Christian Schneider
d4b0a8e58a Use a histogram in brute mode
- Prevent false positives that slow down brute mode by using a histogram that filters data too redundant for a deflate stream
2017-08-21 06:54:43 +02:00
Christian Schneider
a1b66f585d Merge pull request #64 from MarcioPais/master
JPG parsing corrected and faster
Fix issues #5 and #24
2017-08-17 07:02:31 +02:00
Márcio Pais
0315bb1cf9 Fix issues #5 and #24 2017-08-14 12:36:20 +01:00
Christian Schneider
6a6dea54a3 Both brute and intense mode can be active 2017-08-14 07:11:58 +02:00
Christian Schneider
b8dffbbba6 Both brute and intense mode can be active 2017-08-14 07:01:31 +02:00
Christian Schneider
b63677c4d9 Skip uncompressed zlib blocks (BTYPE = 00) in brute mode
- They can be useful in slow mode, but in brute mode, there are short false positive that can cause massive slowdown
2017-08-13 11:09:44 +02:00
Christian Schneider
9303a0b951 Don't skip uncompressed zlib blocks (BTYPE = 00)
- These are often used in combination with static/dynamic BTYPE blocks, so they have to be processed, too.
2017-08-04 06:58:54 +02:00
Christian Schneider
2fcb7fe896 Check for "final compression found" improved
- identical compressed size must be the same, too
- before, there were cases where everything was decompressed, but identical compressed size was smaller than it could be with other combinations
- improves compression ratio for some files
2017-08-04 06:54:56 +02:00
Christian Schneider
2ed93fd799 Useless code line removed
- final_compression_found is set to false in init_decompression_variables() already
2017-07-31 12:03:29 +02:00
Christian Schneider
aed3a94c0f Comment adjusted 2017-07-30 10:29:11 +02:00
Christian Schneider
f939c8254b Minimal decompressed size in brute mode adjusted
- Using 1024 bytes instead of 256 bytes is much faster and still detects most relevant streams
2017-07-30 10:28:05 +02:00
Christian Schneider
843df069d1 "Intense" instead of "slow" (mode) 2017-07-29 11:27:17 +02:00
Christian Schneider
3a06e3ca46 Use intense/brute mode helper functions
- Also remove old code that disabled intense mode in general if brute mode was enabled
2017-07-29 11:25:58 +02:00
Christian Schneider
6739bd942e Helper functions for intense/brute mode
- We don't want both active (since brute mode detects everything that intense mode detects), but they can have different recursion depth limits, so helper functions helps keeping things clean
2017-07-29 11:22:09 +02:00
Christian Schneider
796a44ed00 Consistently use "intense mode"
- Some variables and comments still use the old term "slow mode"
2017-07-29 11:10:27 +02:00
Christian Schneider
9dd8029bbd At least 256 decompressed bytes in brute mode 2017-07-28 10:47:57 +02:00
Christian Schneider
f50f26dfb0 Intense and brute ignore offsets as pointer
- Simplifies recursion code
2017-07-28 10:37:08 +02:00
Christian Schneider
3e60ff474f Ignore offsets in intense/brute mode
- Offsets where streams of type PNG, ZIP, SWF, gZip, PDF have already been analyzed and got "No matches" are skipped in intense and brute mode as they'd lead to the same result but take the same time.
2017-07-27 15:11:21 +02:00
Christian Schneider
fac05e19de Merge branch 'master' into intense-mode-speedup 2017-07-24 13:00:10 +02:00
Christian Schneider
bdee02f9c7 Compression_Types_Disable for comfort mode
- more consistent to -t+/-t-
- makes -t- recommendation easier
2017-07-24 12:59:43 +02:00
Christian Schneider
8f5c6b4709 Merge branch 'master' into intense-mode-speedup 2017-07-24 11:38:59 +02:00