Commit Graph

  • 283f939974 Added two assert()s. Lasse Collin 2008-04-24 20:19:20 +0300
  • eb348a60b6 Switch to uint16_t as the type of range coder probabilities. Lasse Collin 2008-04-24 19:22:53 +0300
  • 6c5306e312 Fix wrong return type (uint32_t -> bool). Lasse Collin 2008-04-24 18:39:57 +0300
  • 712cfe3ebf Fix data corruption in LZ encoder with LZMA_SYNC_FLUSH. Lasse Collin 2008-04-24 18:38:00 +0300
  • bc04486e36 Fix fastpos problem in Makefile.am when built with --enable-small. Lasse Collin 2008-04-24 17:33:01 +0300
  • 7ab493924e Use 64-bit integer as range encoder's cache size. This fixes a theoretical data corruption, which should be very hard to trigger even intentionally. Lasse Collin 2008-04-24 17:30:51 +0300
  • 641998c3e1 Replaced the range decoder optimization that used arithmetic right shift with as fast version that doesn't need arithmetic right shift. Removed the related check from configure.ac. Lasse Collin 2008-03-24 16:38:40 +0200
  • ad999efd27 Take advantage of arithmetic right shift in range decoder. Lasse Collin 2008-03-22 14:39:34 +0200
  • 03e0e8a0d7 Added autoconf check to detect if we can use arithmetic right shift for optimizations. Lasse Collin 2008-03-22 14:18:29 +0200
  • 7521bbdc83 Update a comment to use the variable name rep_len_decoder. Lasse Collin 2008-03-22 01:26:36 +0200
  • 63b74d000e Demystified the "state" variable in LZMA code. Use the word literal instead of char for better consistency. There are still some names with _char instead of _literal in lzma_optimum, these may be changed later. Lasse Collin 2008-03-22 00:57:33 +0200
  • e6eb0a2675 Fix data corruption in LZMA encoder. Note that this bug was specific to liblzma and was *not* present in LZMA SDK. Lasse Collin 2008-03-14 23:16:11 +0200
  • 7d516f5129 Fix a comment API header. Lasse Collin 2008-03-14 21:32:37 +0200
  • 748d6e4274 Make lzma_stream.next_in const. Let's see if anyone complains. Lasse Collin 2008-03-12 23:14:50 +0200
  • bfde3b24a5 Apply a minor speed optimization to LZMA decoder. Lasse Collin 2008-03-11 15:35:34 +0200
  • f310c50286 Initialize the last byte of the dictionary to zero so that lz_get_byte(lz, 0) returns zero. This was broken by 1a3b218598. Lasse Collin 2008-03-11 15:17:16 +0200
  • 5ead36cf7f Really fix the price count initialization. Lasse Collin 2008-03-10 15:57:55 +0200
  • d4d7feb83d Updated THANKS. Lasse Collin 2008-03-10 13:47:17 +0200
  • 0541c5ea63 Initialize align_price_count and match_price_count in lzma_encoder_init.c. While we don't call fill_distances_prices() and fill_align_prices() in lzma_lzma_encoder_init(), we still need to initialize these two variables so that the fill functions get called in lzma_encoder_getoptimum.c in the beginning of a stream. Lasse Collin 2008-03-10 13:46:48 +0200
  • 596fa1fac7 Always initialize lz->temp_size in lz_decoder.c. temp_size did get initialized as a side-effect after allocating a new decoder, but not when the decoder was reused. Lasse Collin 2008-03-10 13:44:29 +0200
  • 45e43e1695 Don't fill allocated memory with 0xFD when debugging is enabled. It hides errors from Valgrind. Lasse Collin 2008-03-10 13:41:25 +0200
  • c0e19e0662 Remove two redundant validity checks from the LZMA decoder. These are already checked elsewhere, so omitting these gives (very) tiny speed up. Lasse Collin 2008-02-28 10:24:31 +0200
  • de74858062 Tiny clean up to file-format.txt. Lasse Collin 2008-02-06 13:25:32 +0200
  • 1a3b218598 Don't memzero() the history buffer when initializing LZ decoder. There's no danger of information leak here, so it isn't required. Doing memzero() takes a lot of time with large dictionaries, which could make it easier to construct DoS attack to consume too much CPU time. Lasse Collin 2008-02-02 14:51:06 +0200
  • 7e796e312b Do uncompressed size validation in raw encoder. This way it gets done for not only raw encoder, but also Block and LZMA_Alone encoders. Lasse Collin 2008-02-01 08:39:26 +0200
  • 7dd48578a3 Avoid unneeded function call in raw_common.c. Lasse Collin 2008-02-01 08:32:05 +0200
  • b596fac963 Updated THANKS. Lasse Collin 2008-01-26 21:42:38 +0200
  • e9f6e9c075 Added note.GNU-stack to x86 assembler files. It is needed when using non-executable stack. Lasse Collin 2008-01-26 21:40:23 +0200
  • 4c7ad179c7 Added api/lzma/easy.h. I had forgot to add this to the git repo. Thanks to Stephan Kulow. Lasse Collin 2008-01-26 19:12:50 +0200
  • 288b232f54 Added more test files. Lasse Collin 2008-01-26 11:09:17 +0200
  • c467b0defc Added more test files. Lasse Collin 2008-01-26 10:47:55 +0200
  • f9842f7127 Return LZMA_HEADER_ERROR if LZMA_SYNC_FLUSH is used with any of the so called simple filters. If there is demand, limited support for LZMA_SYNC_FLUSH may be added in future. Lasse Collin 2008-01-26 00:25:34 +0200
  • e988ea1d1a Added more Multi-Block test files. Improved some descriptions in the test files' README. Lasse Collin 2008-01-25 23:50:35 +0200
  • 4441e00418 Combine lzma_options_block validation needed by both Block encoder and decoder, and put the shared things to block_private.h. Improved the checks a little so that they may detect too big Compressed Size at initialization time if lzma_options_block.total_size or .total_limit is known. Lasse Collin 2008-01-25 23:12:36 +0200
  • bf4200c818 Added test_memlimit.c. Lasse Collin 2008-01-25 19:21:22 +0200
  • 7b8fc7e6b5 Improved the memory limitter: - Added lzma_memlimit_max() and lzma_memlimit_reached() API functions. - Added simple estimation of malloc()'s memory usage overhead. - Fixed integer overflow detection in lzma_memlimit_alloc(). - Made some white space cleanups and added more comments. Lasse Collin 2008-01-25 19:20:28 +0200
  • e0c3d0043d Use more parenthesis in succeed() macro in tests/tests.h. Lasse Collin 2008-01-25 13:55:52 +0200
  • 1fd76d4881 Added more Multi-Block Stream test files. Lasse Collin 2008-01-24 14:49:34 +0200
  • 6e27b1098a Added bunch of test files containing Multi-Block Streams. Lasse Collin 2008-01-24 00:46:05 +0200
  • db9df0a960 Fix decoding of empty Metadata Blocks, that don't have even the Metadata Flags field. Earlier the code allowed such files; now they are prohibited as the file format specification requires. Lasse Collin 2008-01-23 23:43:00 +0200
  • 765f0b05f6 Fix a bug related to 99e12af4e2. lzma_metadata.header_metadata_size was not properly set to zero if the Metadata had only the Metadata Flags field. Lasse Collin 2008-01-23 23:38:18 +0200
  • 3a7cc5c3de Fix decoding of Extra Records that have empty Data. Lasse Collin 2008-01-23 23:35:49 +0200
  • e5fdec93e2 Add the trailing '\0' to lzma_extra.data as the API header already documents. Lasse Collin 2008-01-23 22:02:38 +0200
  • ed40dc5a2c Added debug/full_flush.c. Lasse Collin 2008-01-23 21:21:21 +0200
  • ae0cd09a66 Return LZMA_STREAM_END instead of LZMA_OK if LZMA_SYNC_FLUSH or LZMA_FULL_FLUSH is used when there's no unfinished Block open. Lasse Collin 2008-01-23 21:05:33 +0200
  • 0e80ded13d Added bad-single-none-footer_filter_flags.lzma and bad-single-none-too_long_vli.lzma. Lasse Collin 2008-01-23 20:05:01 +0200
  • 8c8eb14055 Fixed a typo. Lasse Collin 2008-01-23 13:42:35 +0200
  • 980f65a9a1 Fix a memory leak in the Subblock encoder. Lasse Collin 2008-01-23 13:40:45 +0200
  • 99e12af4e2 Fix Size of Header Metadata Block handling. Now lzma_metadata.header_metadata_size == LZMA_VLI_VALUE_UNKNOWN is not allowed at all. To indicate missing Header Metadata Block, header_metadata_size must be set to zero. This is what Metadata decoder does after this patch too. Lasse Collin 2008-01-23 13:36:07 +0200
  • 58b78ab20c Fix a memory leak in metadata_decoder.c. Lasse Collin 2008-01-23 13:15:55 +0200
  • 4d8cdbdab4 Fix the fix 863028cb7a which just moved to problem. Now it's really fixed. Lasse Collin 2008-01-23 13:13:58 +0200
  • 67321de963 Take advantage of return_if_error() macro in lzma_info_metadata_set() in info.c. Lasse Collin 2008-01-23 00:21:04 +0200
  • 863028cb7a Fixed a dangling pointer that caused invalid free(). Lasse Collin 2008-01-23 00:18:32 +0200
  • cf49f42a6b Added lzma_easy_* functions. These should make using liblzma as easy as using zlib, because the easy API don't require developers to know any fancy LZMA options. Lasse Collin 2008-01-22 22:49:24 +0200
  • 1747b85a43 Fix Multi-Block Stream encoder's EOPM usage. Lasse Collin 2008-01-22 21:16:22 +0200
  • 0ed6f1adce Made lzma_extra pointers const in lzma_options_stream. Lasse Collin 2008-01-22 00:15:11 +0200
  • 305afa38f6 Updated debug/sync_flush.c. Lasse Collin 2008-01-20 20:15:21 +0200
  • d53e9b7705 Added debug/repeat.c. Lasse Collin 2008-01-20 20:14:26 +0200
  • 107259e306 Fix alignment handling bugs in Subblock encoder. Lasse Collin 2008-01-20 20:12:58 +0200
  • e141fe1895 Implemented LZMA_SYNC_FLUSH support to the Subblock encoder. The API for handing Subfilters was changed to make it consistent with LZMA_SYNC_FLUSH. Lasse Collin 2008-01-19 21:16:33 +0200
  • 23c227a864 Revised the Delta filter implementation. The initialization function is still shared between encoder and decoder, but the actual coding is in separate files for encoder and decoder. Lasse Collin 2008-01-19 15:19:21 +0200
  • 61dc82f3e3 Added the debug directory and the first debug tool (sync_flush). These tools are not built unless the user runs "make" in the debug directory. Lasse Collin 2008-01-18 20:18:08 +0200
  • 0ae3208db9 Added test files to test usage of flush marker in LZMA. Lasse Collin 2008-01-18 20:13:00 +0200
  • ab5feaf1fc Fix LZMA_SYNC_FLUSH handling in LZ and LZMA encoders. That code is now almost completely in LZ coder, where it can be shared with other LZ77-based algorithms in future. Lasse Collin 2008-01-18 20:02:52 +0200
  • 079c4f7fc2 Don't add -g to CFLAGS when --enable-debug is specified. It's the job of the user to put that in CFLAGS. Lasse Collin 2008-01-18 17:21:24 +0200
  • 61d1784d8f Set stdin and stdout to binary mode on Windows. This patch is a forward port of b7b22fcb979a16d3a47c8001f058c9f7d4416068 from lzma-utils-legacy.git. I don't know if the new code base builds on Windows, but this is a start. Lasse Collin 2008-01-18 14:17:37 +0200
  • c9cba97691 Added test_compress.sh and bunch of files needed by it. This new set of tests compress and decompress several test files with many different compression options. This set of tests will be extended later. Lasse Collin 2008-01-18 00:50:29 +0200
  • 33be3c0e24 Subblock decoder: Don't exit the main loop in decode_buffer() too early if we hit End of Input while decoding a Subblock of type Repeating Data. To keep the loop termination condition elegant, the order of enumerations in coder->sequence were changed. Lasse Collin 2008-01-17 18:56:53 +0200
  • b254bd97b1 Fix wrong too small size of argument unfiltered_max in ia64_coder_init(). It triggered assert() in simple_coder.c, and could have caused a buffer overflow. Lasse Collin 2008-01-17 17:39:42 +0200
  • 8f5794c8f1 Added --delta to the output of "lzma --help". Lasse Collin 2008-01-17 17:27:45 +0200
  • f88590e001 Fix Subblock docoder: If Subblock filter was used with known Uncompressed Size, and the last output byte was from RLE, the code didn't stop decoding as it should have done. Lasse Collin 2008-01-17 13:14:20 +0200
  • bc0b945ca3 Tiny non-technical edits to file-format.txt. Lasse Collin 2008-01-16 16:33:37 +0200
  • 7599bb7064 Plugged a memory leak in stream_decoder.c. Lasse Collin 2008-01-16 14:48:04 +0200
  • 0b58153931 Added memory leak detection to lzmadec.c. Lasse Collin 2008-01-16 14:47:27 +0200
  • 5b5b13c7bb Added lzma_memlimit_count(). Lasse Collin 2008-01-16 14:46:50 +0200
  • 19389f2b82 Added ARRAY_SIZE(array) macro. Lasse Collin 2008-01-16 14:31:44 +0200
  • 9bc33a54cb Make Uncompresed Size validation more strict in alone_decoder.c. Lasse Collin 2008-01-16 13:27:03 +0200
  • 01d71d60b7 Free the allocated memory in lzmadec if debugging is enabled. This should make it possible to detect possible memory leaks with Valgrind. Lasse Collin 2008-01-15 17:46:59 +0200
  • 8235e6e5b2 Fix memory leaks from test_block_header.c. Lasse Collin 2008-01-15 16:25:38 +0200
  • f10fc6a69d Use fastpos.h when encoding LZMA dictionary size in Filter Flags encoder. Lasse Collin 2008-01-15 14:23:35 +0200
  • e5728142a2 Revised the fastpos code. It now uses the slightly faster table-based version from LZMA SDK 4.57. This should be fast on most systems. Lasse Collin 2008-01-15 14:02:22 +0200
  • 10437b5b56 Added bsr.h. Lasse Collin 2008-01-15 13:32:13 +0200
  • f3c88e8b8d Fixed assembler detection in configure.ac, and added detection for x86_64. Lasse Collin 2008-01-15 13:29:14 +0200
  • 54ec204f58 Omit invalid space from printf() format string in price_table_gen.c. Lasse Collin 2008-01-15 12:20:41 +0200
  • 01b4b19f49 Removed a few unused macros from lzma_common.h. Lasse Collin 2008-01-15 09:54:34 +0200
  • 19bd7f3cf2 Fix a typo in lzma_encoder.c. Lasse Collin 2008-01-15 08:37:42 +0200
  • 9f9b198301 Convert bittree_get_price() and bittree_reverse_get_price() from macros to inline functions. Lasse Collin 2008-01-15 08:36:25 +0200
  • 78e85cb1a7 Fix CRC code in case --enable-small is used. Lasse Collin 2008-01-15 07:44:59 +0200
  • 949d4346e2 Fix typo in test_index.c. Lasse Collin 2008-01-15 07:41:39 +0200
  • d13d693155 Added precomputed range coder probability price table. Lasse Collin 2008-01-15 07:40:21 +0200
  • 362dc3843b Remove RC_BUFFER_SIZE from lzma_encoder_private.h and replace it with a sanity check. Lasse Collin 2008-01-14 13:42:43 +0200
  • 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. Lasse Collin 2008-01-14 13:39:54 +0200
  • b59ef39737 Added one assert() to process.c of the command line tool. Lasse Collin 2008-01-14 13:34:29 +0200
  • 9547e734a0 Don't use coder->lz.stream_end_was_reached in assertions in match_c.h. Lasse Collin 2008-01-14 12:09:52 +0200
  • 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. Lasse Collin 2008-01-14 12:08:02 +0200
  • a670fec802 Small LZMA_SYNC_FLUSH fixes to Block and Single-Stream encoders. Lasse Collin 2008-01-14 11:56:41 +0200
  • 3599dba957 More fixes to LZMA decoder's flush marker handling. Lasse Collin 2008-01-14 11:54:56 +0200
  • f73c2ab607 Eliminate lzma_lz_encoder.must_move_pos. It's needed only in one place which isn't performance criticial. Lasse Collin 2008-01-10 17:13:42 +0200
  • 382808514a Define HAVE_ASM_X86 when x86 assembler optimizations are used. This #define will be useful for inline assembly. Lasse Collin 2008-01-09 20:05:57 +0200
  • 0e70fbe403 Added good-single-none-empty_3.lzma and bad-single-none-empty.lzma. Lasse Collin 2008-01-09 12:06:46 +0200