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
Christian Schneider
3f973a2e44
Merge pull request #62 from schnaader/pr/61
...
preserve input file name
2017-07-24 11:35:33 +02:00
Christian Schneider
39333197f3
Lower case -t- recommendation
2017-07-24 11:15:48 +02:00
Christian Schneider
1c2cf7615f
-t- recommendation for decompressed_count > 0 only
...
- Recommandation should be displayed when recompressed count is zero, but decompressed count is higher (e.g. 0/5 PNG). This way, only disabling the streams that actually slowed down processing is recommened (0/0 streams don't slow down the process)
2017-07-24 11:13:20 +02:00
Christian Schneider
78ed8160d2
Boolean operator fix
...
- Same boolean operator for PDF as for all others
2017-07-24 11:03:28 +02:00
Christian Schneider
b5da5d17b6
Some corrections for -t- recommendation
...
- GIF is F, not G
- Order changed (MP3 last) to match Precomp syntax order for -t
2017-07-24 11:02:31 +02:00
Christian Schneider
6bfe8a154f
Remove "#define COMFORT" leftover
2017-07-24 10:54:41 +02:00
guptaprince8832
d596c0f603
Speed up recommendations with -t- options
2017-07-17 22:42:49 +05:30
guptaprince8832
1a8cbd3eb3
preserve input file name
2017-07-17 21:45:14 +05:30
Christian Schneider
e003b02784
Check BTYPE
...
- prevents uncompressed deflate chunks and the ones with "BTYPE = 11 (reserved (error))" to be processed
- speeds up brute mode on some data
2017-07-03 08:38:28 +02:00
Christian Schneider
5cdacad8b3
"Less than 32 bytes" test in memory
...
- check_inf_result returns bool
- Don't show a message about it in debug mode
2017-07-02 11:43:09 +02:00
Christian Schneider
e015b1e470
Check inflate in memory first
...
- Use it for brute mode, too
2017-07-02 11:14:40 +02:00
Christian Schneider
66a032c0a8
Check inflate in memory first
...
- Before opening temporary files and using inflate, test it on the first 2 KB of the stream that are already in memory (input buffer in_buf)
- Accelerates intense mode due to reduced I/O
2017-06-30 20:49:12 +02:00
Christian Schneider
2fcd184a6e
lzma progress
...
- don't show it when recompressing (-r)
- show it when converting to lzma (-nl)
2017-06-27 07:16:05 +02:00
Christian Schneider
2b7fc2d2ed
Merge branch 'master' into progress_with_io
2017-06-27 06:54:14 +02:00
Christian Schneider
f49298ca06
Merge pull request #58 from sftt/master
...
- Minor bugfix for Precomp Comfort
- Memory leak in packmp3 fixed
- Updated liblzma to 5.2.3
- x64 configuration in VS
2017-06-27 06:53:03 +02:00
Christian Schneider
e44733f5e0
Undo packJPG change
...
- The change succeeded in compressing the sample file from https://github.com/packjpg/packJPG/issues/4 , but lead to crashes on other files (see https://github.com/schnaader/precomp-cpp/pull/58 for two examples)
2017-06-20 07:03:56 +02:00
Christian Schneider
14ab46353b
Add x64 VS build folders to .gitignore
2017-06-20 06:14:47 +02:00
Christian Schneider
ac6547273d
x64 in VS without COMFORT
2017-06-19 06:57:42 +02:00
Christian Schneider
5374942d97
Better progress indication
...
- Progress of copying uncompressed bytes is shown
- Better bzip2 on-the-fly compression progress
- lzma on-the-fly compression: As this buffers internally and we do not know how much bytes will be written beforehand, it shows a seperate progress text (total/written/left lzma data in MiB)
- Use of std::string constructor instead of "\b\b\b..." strings
- No more "status strings" in DLL mode (e.g. "Precompressing: ")
- Time between progress updates set to 250 ms for both work sign and percentage
2017-06-16 07:31:37 +02:00
Christian Schneider
1dac54dfa5
Helper method for displaying progress
2017-06-11 11:47:05 +02:00
Christian Schneider
86fa069bec
Fx issue #59
...
- Unhandled GIF_ERROR led to accessing uninitialized memory
2017-06-07 07:01:58 +02:00
Gavin Gao
fa2dc68704
Update to liblzma xz-5.2.3 released on 2016-12-30.
2017-05-04 11:41:35 +08:00
Gavin Gao
9081053eba
Minor bugfixes for precomf/packmp3/packjpg
...
- Fixed init_comfort(): missing suppress_jpg_parsing_until
- Fixed memory leak and bad huffman table check in packMP3
0c283d8e1c
- packjpg: add extra range to 172 when (1024+6-1)/6 = 171.5
https://github.com/packjpg/packJPG/issues/4
- add x64 to VS project with BIT64;COMFORT;
2017-05-04 11:33:35 +08:00