Commit graph

98 commits

Author SHA1 Message Date
Alex Xu (Hello71)
3a84725d31 use __linux/__unix instead of CMAKE_C(XX)_FLAGS
this allows the user-specified CFLAGS/CXXFLAGS to take effect.

assume that all platforms supporting C++ in 2021 also support stdbool.h.
2021-11-20 10:30:19 -05:00
Christian Schneider
7fc569949e Increase JPG/MP3 in-memory threshold
- maximum size 512 MB instead of 64 MB
- verbose output if JPGs are too large for in-memory (and packJPG is used as fallback)
2019-11-07 00:14:21 +01:00
Christian Schneider
0ae4d15296 Added brotli and brunsli license files 2019-11-06 23:25:07 +01:00
Christian Schneider
29a8b5fe0e Fix BrunsliDecodeJpeg definition 2019-11-06 18:02:59 +01:00
Christian Schneider
b422204c55 Disable brunsli logging
- with enabled logging, brunsli is too verbose and will spam precomp's output
2019-11-06 17:49:40 +01:00
Christian Schneider
9644f76d71 revert bit shift fix
- reverted because 7 * section_size_bytes will never be greater than 64 if the function is used correctly, so the code is correct
2019-11-06 16:55:30 +01:00
Christian Schneider
770e9e7a17 Fixing bit shift
- shifts with values greater than 63 lead to undefined behaviour in MSVC
2019-11-06 15:55:18 +01:00
Christian Schneider
f92a95d797 fix
state (with use_brotli flag) must be passed to EncodeMetaData
2019-11-06 15:35:19 +01:00
Christian Schneider
1dadc0e1a7 Fix BrunsliEncodeJpeg definition 2019-11-06 15:22:29 +01:00
Christian Schneider
d5a0d774d3 Use "use_brotli" flag
- if not set, metadata gets copied instead of compressed
2019-10-22 12:20:43 +02:00
Christian Schneider
006a5849b1 Add "use_brotli" flag
- brotli compression of metadata will be optional, so a flag is added to both encoder and decoder
- precomp will pass the flag to Brunsli[Decode/Encode]Jpeg
2019-10-22 12:07:44 +02:00
Christian Schneider
a4e06aafdf Source code integration of brotli and brunsli
- added source code files
- adjusted CMakeLists.txt
- brunsli pulled from official GitHub repo (google/brunsli) at commit 071877e87f13e39fa6667b27ab09420dfcf67bdc
2019-10-20 16:24:20 +02:00
Christian Schneider
a0401d7a26 Fixed out-of-bounds read in packJPG
- Should fix #99
2019-05-16 07:58:30 +02:00
Christian Schneider
3bcf753840
Update README.md to 0.3.5
Source: https://github.com/deus-libri/preflate/blob/master/README.md
2019-02-26 11:24:02 +01:00
Christian Schneider
7be858bd41 Merge preflate 0.3.5 changes
- fixes #88 and #89
2018-09-30 10:08:45 +02:00
Gavin Gao
2384fc36d8 Fix MSVC (x64)build
Add missing preflate source files
2018-09-27 18:22:52 +08:00
Christian Schneider
d6499198c2 Include missing header for uint16_t
- didn't compile on Ubuntu 18.04/gcc 7.3 because uint16_t was unknown
- fixes #83
2018-09-15 09:11:13 +02:00
Christian Schneider
a255854c1a Adjust CMakeLists.txt for Linux (should fix #83) 2018-09-14 06:20:27 +00:00
Deus Libri
041d6b28e7 Update preflate to v0.3.4 which adds a task pool to give nice speedups
for large deflate streams.
However, preflate hogs much more memory now than anticipated. Needs to
be investigated.
2018-07-01 01:45:06 +02:00
Deus Libri
677e8c5fb0 Add fix from PackMP3 master.
Without this, some MP3 streams might crash on reconstruction.
2018-06-24 22:33:38 +02:00
Deus Libri
78b918dc18 - update to preflate v0.3.2 (bug fix)
- add switch -pfverify to force preflate to verify its result and store
  mishandled deflate streams in files
2018-05-09 23:13:13 +02:00
Deus Libri
c48a0b5c4c Add command line options to set LZMA literal compression flags (-llc,
-llp, -lpb) and preflate meta block size (-pfmeta).
2018-04-30 21:50:37 +02:00
Deus Libri
4772a9c37b Update to preflate v0.3.1
Splits up large deflate streams to blocks responsible for ~2MiB of
uncompressed data each. This reduces memory pressure a LOT.
2018-04-30 08:27:18 +02:00
Deus Libri
0cdefd8561 Update preflate to v0.2.1 2018-04-28 23:51:25 +02:00
Deus Libri
48b114b1ef Update preflate 2018-04-22 11:20:52 +02:00
Deus Libri
2f300ae194 Bugfix for stored blocks of invalid length. 2018-04-15 23:42:02 +02:00
Deus Libri
eccd92f8c0 Initial commit.
This contains the needed sources, and some executables for testing.
The build files are not yet up-to-date.
2018-04-14 22:05:37 +02:00
Christian Schneider
784e6bd085 Make Visual Studio happy
Struct array initialization works in GCC, but gives runtime error in VS
2018-02-14 19:12:37 +01:00
Christian Schneider
79a785d928 LZMA executable filter parameter
WIP completed, LZMA filters can now be used
2018-02-13 13:03:00 +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
Michael Reim
581344f7b4 Change Makefiles to be compatible with non-GCC platforms (e.g. FreeBSD) 2017-11-10 16:42:02 +01:00
Christian
116d7d981d Makefiles for 32 bit version 2017-09-22 18:55:51 +02:00
Christian Schneider
36a96bd95e 64 MB I/O buffer not only for JPG 2017-08-28 16:52:47 +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
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
Christian Schneider
dcc1c648f2 Add parameters for LZMA memory and thread count
- Use at least the memory for LZMA preset 1
- Added methods for memory and thread defaults to avoid code duplication
- Fix: Precomp Comfort used invalid Compression_Method as default
- Fix: Use singular if only 1 thread is used
- Fix: precomp_dll.h had use_mp3 declared twice
2017-04-05 16:49:58 +02:00
Christian Schneider
ea7af5f2fd Show LZMA block size 2017-04-05 13:44:45 +02:00
Christian Schneider
baf7d68dd8 Use old Makefile 2017-04-05 10:36:07 +02:00
Christian Schneider
5f2de4844c Removed unnecessary files
Re-added commented gzguts.h modification
2017-04-05 10:23:33 +02:00
Prince Gupta
88d5081582 update to zlib-1-2-11 2017-04-03 22:06:48 +05:30
schnaader
05a6e77880 liblzma Makefile uses std=gnu99
This fixes compile errors on e.g. Ubuntu
2017-02-28 06:48:37 +01:00
Christian Schneider
64a50242d7 Compile 64 bit versions by default 2017-01-02 10:00:47 +01:00
Christian Schneider
b0e9d813b6 Some Makefile changes
- make.bat: Use other GCC64/GPP64 defaults
- make.bat and Makefiles: No -fsched-spec-load, older compilers don't
support it
- make.bat and Makefiles: Use -std=c99 and -std=c++11 to make sure
everything compiles correct on different compilers
2017-01-02 09:50:57 +01:00
Christian Schneider
28f3a72899 Use multithreaded lzma2 only 2016-12-29 18:31:47 +01:00
Christian Schneider
fba3d150aa Remove old LZMA preset code 2016-12-29 18:08:57 +01:00
Christian Schneider
5568734be5 Use the LZMA preset that satisfies memory limits 2016-12-29 18:07:51 +01:00
Christian Schneider
52be43eaa4 Show OS and 32-/64-bit information 2016-12-28 16:52:45 +01:00
Christian Schneider
769bdc3a74 Autodetect number of threads for LZMA
- Print memory usage
- Minor changes in compress_easy_mt.cpp (indentation, comments, removing
some unnecessary code)
2016-12-28 11:14:41 +01:00