Commit Graph

609 Commits

Author SHA1 Message Date
Lasse Collin e22b37968d Major changes to LZ encoder, LZMA encoder, and range encoder.
These changes implement support for LZMA_SYNC_FLUSH in LZMA
encoder, and move the temporary buffer needed by range encoder
from lzma_range_encoder structure to lzma_lz_encoder.
2008-01-14 13:39:54 +02:00
Lasse Collin b59ef39737 Added one assert() to process.c of the command line tool. 2008-01-14 13:34:29 +02:00
Lasse Collin 9547e734a0 Don't use coder->lz.stream_end_was_reached in assertions
in match_c.h.
2008-01-14 12:09:52 +02:00
Lasse Collin 3e09e1c058 In lzma_read_match_distances(), don't use
coder->lz.stream_end_was_reached. That variable
will be removed, and the check isn't required anyway.
Rearrange the check so that it doesn't make one to
think that there could be an integer overflow.
2008-01-14 12:08:02 +02:00
Lasse Collin a670fec802 Small LZMA_SYNC_FLUSH fixes to Block and Single-Stream encoders. 2008-01-14 11:56:41 +02:00
Lasse Collin 3599dba957 More fixes to LZMA decoder's flush marker handling. 2008-01-14 11:54:56 +02:00
Lasse Collin f73c2ab607 Eliminate lzma_lz_encoder.must_move_pos. It's needed
only in one place which isn't performance criticial.
2008-01-10 17:13:42 +02:00
Lasse Collin 382808514a Define HAVE_ASM_X86 when x86 assembler optimizations are
used. This #define will be useful for inline assembly.
2008-01-09 20:05:57 +02:00
Lasse Collin 0e70fbe403 Added good-single-none-empty_3.lzma and
bad-single-none-empty.lzma.
2008-01-09 12:06:46 +02:00
Lasse Collin 379fbbe84d Take advantage of return_if_error() in block_decoder.c. 2008-01-08 23:11:59 +02:00
Lasse Collin 97d5fa8207 Updated tests/files/README. 2008-01-08 23:10:57 +02:00
Lasse Collin 3bb9bb3109 Added test files with empty Compressed Data. 2008-01-08 23:05:40 +02:00
Lasse Collin 7054c5f588 Fix decoding of Blocks that have only Block Header. 2008-01-08 22:58:42 +02:00
Lasse Collin 753e4d95cd Added good-single-subblock_implicit.lzma. 2008-01-08 22:27:46 +02:00
Lasse Collin faeac7b7ac Disable CRC32 from Block Headers when --check=none
has been specified.
2008-01-08 18:50:30 +02:00
Lasse Collin a751126dbb Fixed encoding of empty files. Arguments to is_size_valid()
were in wrong order in block_encoder.c.
2008-01-08 13:36:29 +02:00
Lasse Collin 9080267603 Added a few test files. 2008-01-08 13:35:36 +02:00
Lasse Collin b4943ccf73 Avoid using ! in test_files.sh, because that doesn't work
with some ancient /bin/sh versions.
2008-01-08 12:29:58 +02:00
Lasse Collin e2417b2b91 More pre-C99 inttypes.h compatibility fixes. Now the code
should work even if the system has no inttypes.h.
2008-01-08 00:48:30 +02:00
Lasse Collin 5d227e51c2 Updated fi.po although it's currently pretty much crap. 2008-01-07 23:25:32 +02:00
Lasse Collin c7189d981a Test for $GCC = yes instead of if it is non-empty. This
way it is possible to use ac_cv_c_compiler_gnu=no to
force configure to think it is using non-GNU C compiler.
2008-01-07 23:14:25 +02:00
Lasse Collin 3dbbea82b7 Added test_files.sh to tests/Makefile.am so it gets
included in the tarball with "make dist".
2008-01-07 21:49:41 +02:00
Lasse Collin 2fd2d18154 Cosmetic edit to test_files.sh. 2008-01-07 18:22:24 +02:00
Lasse Collin 9a71d57310 Added tests/files/README. 2008-01-07 18:09:44 +02:00
Lasse Collin 47f48fe993 Tell in COPYING that everything in tests/files is
public domain.
2008-01-07 14:20:57 +02:00
Lasse Collin 3502b3e1d0 Cleaned up the tests/files directory. 2008-01-07 14:19:05 +02:00
Lasse Collin 908b2ac604 Added test_files.sh to test decoding of the files in
the tests/files directory. It doesn't test the malicious
files yet.
2008-01-07 13:49:19 +02:00
Lasse Collin ecb2a6548f Updated README regarding the assembler optimizations. 2008-01-07 11:23:13 +02:00
Lasse Collin eacb805043 Updated THANKS. 2008-01-07 10:58:00 +02:00
Lasse Collin 1239649f96 Cosmetic changes to configure.ac. 2008-01-06 21:47:17 +02:00
Lasse Collin 88ee301ec2 Automatically disable assembler code on Darwin x86.
Darwin has different ABI than GNU+Linux and Solaris,
thus the assembler code doesn't assemble on Darwin.
2008-01-06 19:46:38 +02:00
Lasse Collin c15a7abf66 With printf(), use PRIu64 with a cast to uint64_t instead
of %zu, because some pre-C99 libc versions don't support %zu.
2008-01-06 19:45:27 +02:00
Lasse Collin 4e7e54c4c5 Introduced compatibility with systems that have pre-C99
or no inttypes.h. This is useful when the compiler has
good enough support for C99, but libc headers don't.

Changed liblzma API so that sys/types.h and inttypes.h
have to be #included before #including lzma.h. On systems
that don't have C99 inttypes.h, it's the problem of the
applications to provide the required types and macros
before #including lzma.h.

If lzma.h defined the missing types and macros, it could
conflict with third-party applications whose configure
has detected that the types are missing and defined them
in config.h already. An alternative would have been
introducing lzma_uint32 and similar types, but that would
just be an extra pain on modern systems.
2008-01-06 16:27:41 +02:00
Lasse Collin a71864f77d Fix typo in comment (INT64_MAX -> UINT64_MAX). 2008-01-05 19:57:00 +02:00
Lasse Collin 072927905a Rearranged testing of GCC-specific flags. 2008-01-05 19:42:04 +02:00
Lasse Collin d160ee3259 Another bug fix for flush marker detection. 2008-01-05 01:20:24 +02:00
Lasse Collin fc67f79f60 Fix stupid bugs in flush marker detection. 2008-01-04 21:37:01 +02:00
Lasse Collin 0029cbbabe Added support for flush marker, which will be in files
that use LZMA_SYNC_FLUSH with encoder (not implemented
yet). This is a new feature in the raw LZMA format,
which isn't supported by old decoders. This shouldn't
be a problem in practice, since lzma_alone_encoder()
will not allow LZMA_SYNC_FLUSH, and thus not allow
creating files on decodable with old decoders.

Made lzma_decoder.c to require tab width of 4 characters
if one wants to fit the code in 80 columns. This makes
the code easier to read.
2008-01-04 21:30:33 +02:00
Lasse Collin bbfd1f6ab0 Moved range decoder initialization (reading the first
five input bytes) from LZMA decoder to range decoder
header. Did the same for decoding of direct bits.
2008-01-04 20:45:05 +02:00
Lasse Collin 5db745cd2a Added a note to README that --disable-assembler
must be used on Darwin.
2007-12-14 11:15:21 +02:00
Lasse Collin 44b333d461 Use the filename suffix .S instead of .s for assembler files
so that the preprocessor removes the /* */ style comments,
which are not supported by some non-GNU assemblers (Solaris)
that otherwise work with this code.
2007-12-14 10:07:10 +02:00
Lasse Collin ec1c82b2e8 Fixed wrong symbol name in crc64_x86.s. 2007-12-14 09:59:05 +02:00
Lasse Collin 2881570df6 Use .globl instead of .global in x86 assembler code for
better portability. Still needs fixing the commenting.
2007-12-14 09:53:24 +02:00
Lasse Collin 698470b8f3 Fixed a few short options that take an argument.
short_opts[] was missing colons to indicate
required argument. Thanks to Fabio Pedretti for
the bug report.
2007-12-13 20:14:37 +02:00
Lasse Collin 918bcb0e07 Removed uncompressed size tracking from Delta encoder too. 2007-12-11 17:08:04 +02:00
Lasse Collin 3e16d51dd6 Remove uncompressed size tracking from the filter encoders.
It's not strictly needed there, and just complicates the
code. LZ encoder never even had this feature.

The primary reason to have uncompressed size tracking in
filter encoders was validating that the application
doesn't give different amount of input that it had
promised. A side effect was to validate internal workings
of liblzma.

Uncompressed size tracking is still present in the Block
encoder. Maybe it should be added to LZMA_Alone and raw
encoders too. It's simpler to have one coder just to
validate the uncompressed size instead of having it
in every filter.
2007-12-11 16:49:19 +02:00
Lasse Collin 5286723e0d Get rid of no-NLS gnulib. I don't know how to get it
working with Automake. People who want smaller lzmadec
should use --disable-nls on non-GNU systems.
2007-12-11 14:10:53 +02:00
Lasse Collin ce8b036a6c Fixed a typo in tests/Makefile.am which prevented
building the tests if gnulib was needed.
2007-12-11 14:09:35 +02:00
Lasse Collin 7c1ad41eb6 Fixed wrong type of flags_size in Subblock encoder. 2007-12-11 11:18:58 +02:00
Lasse Collin ce64df7162 Bumped version number to 4.42.3alpha. 2007-12-10 20:44:16 +02:00