aboutsummaryrefslogtreecommitdiff
path: root/archival/libarchive (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* gzip2: small simplification in mainSimpleSort()Denys Vlasenko2018-02-031-14/+15
| | | | | | | function old new delta mainQSort3 1165 1163 -2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bzip2: a few more locals converted to generic typesDenys Vlasenko2018-02-031-7/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bzip2: eliminate one parameter to mainQSort3()Denys Vlasenko2018-02-031-5/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bzip2: small simplification in mainSort()Denys Vlasenko2018-02-031-5/+5
| | | | | | | function old new delta mainSort 1127 1118 -9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bzip2: convert some locals to unsigned'sDenys Vlasenko2018-02-031-5/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bzip2: runningOrder[] values are always 0..255, make it uint8Denys Vlasenko2018-02-032-6/+5
| | | | | | | function old new delta mainSort 1171 1124 -47 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bzip2: remove redundant clearing of an alredy unset bitDenys Vlasenko2018-02-031-2/+2
| | | | | | | function old new delta mainSort 1178 1171 -7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bzip2: eliminate write-only local numQSortedDenys Vlasenko2018-02-031-7/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bzip2: make locals in mainSort() saner, convert one of them from uint16 to ↵Denys Vlasenko2018-02-031-29/+36
| | | | | | | | | unsigned function old new delta mainSort 1192 1178 -14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bzip2: remove redundant loop termination check in mainSort()Denys Vlasenko2018-02-031-3/+6
| | | | | | | function old new delta mainSort 1202 1192 -10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bzip2: reduce indentation, no code changesDenys Vlasenko2018-02-031-44/+45
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bzip2: reuse zPend processing codeDenys Vlasenko2018-02-031-31/+13
| | | | | | | function old new delta generateMTFValues 378 357 -21 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bzip2: shrink makeMaps_e()Denys Vlasenko2018-02-031-3/+4
| | | | | | | function old new delta generateMTFValues 378 368 -10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bzip2: optimize zPend variable codeDenys Vlasenko2018-02-033-23/+39
| | | | | | | function old new delta generateMTFValues 433 378 -55 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bzip2: have two separate "store bit 0" and "store bit 1" functionsDenys Vlasenko2018-02-031-6/+19
| | | | | | | | | | | | function old new delta sendMTFValues 2051 2085 +34 bsW1_0 - 33 +33 BZ2_compressBlock 225 223 -2 bsW1 52 - -52 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 1/1 up/down: 67/-54) Total: 13 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bzip2: ~1% speedup by special-casing "store 1 bit" functionDenys Vlasenko2018-02-033-5/+23
| | | | | | | | | | | | function old new delta bsW1 - 52 +52 BZ2_compressBlock 230 225 -5 BZ2_blockSort 125 118 -7 sendMTFValues 2070 2051 -19 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/3 up/down: 52/-31) Total: 21 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bzip2: rewrite bit of code which depends on integer overflowDenys Vlasenko2018-02-031-5/+5
| | | | | | | function old new delta sendMTFValues 2093 2070 -23 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bzip2: delete write-only fave[] arrayDenys Vlasenko2018-02-031-5/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bgip2: fewer specifically-sized [u]int32_t's locals in sendMTFValuesDenys Vlasenko2018-02-031-12/+32
| | | | | | | | | Generic ints/unsigneds are usually fine. Yes, really. function old new delta sendMTFValues 2100 2093 -7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bzip2: code shrinkDenys Vlasenko2018-02-031-5/+10
| | | | | | | function old new delta sendMTFValues 2111 2100 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bzip2: code shrinkDenys Vlasenko2018-02-033-18/+18
| | | | | | | | | | | | | | function old new delta BZ2_compressBlock 225 230 +5 handle_compress 356 355 -1 bsW16 59 56 -3 bsW 64 61 -3 bsFinishWrite 37 32 -5 prepare_new_block 48 34 -14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/5 up/down: 5/-26) Total: -21 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bzip2: code shrinkDenys Vlasenko2018-02-021-11/+25
| | | | | | | | | | | | function old new delta bsW16 - 59 +59 sendMTFValues 2116 2111 -5 bsPutU16 36 - -36 bsPutU32 76 31 -45 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/2 up/down: 59/-86) Total: -27 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: commonalize a bit of little-endian CRC32 table generation codeDenys Vlasenko2018-02-012-2/+2
| | | | | | | | | | | | | | | function old new delta global_crc32_new_table_le - 11 +11 crc32_new_table_le - 9 +9 inflate_unzip_internal 560 556 -4 flash_eraseall_main 823 819 -4 unpack_xz_stream 2403 2394 -9 lzop_main 121 112 -9 gzip_main 187 178 -9 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 0/5 up/down: 20/-35) Total: -15 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* lzop: code shrinkDenys Vlasenko2018-02-011-2/+1
| | | | | | | | function old new delta lzo_decompress 526 524 -2 lzo_compress 473 470 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* tar: accomodate non-terminated tar.chksum fields as seen from github.comDenys Vlasenko2018-01-271-24/+25
| | | | | | | function old new delta get_header_tar 1783 1696 -87 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unlzma: fix SEGV, closes 10436Denys Vlasenko2017-10-271-1/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bunzip2: fix runCnt overflow from bug 10431Denys Vlasenko2017-10-221-11/+19
| | | | | | | | | | | This particular corrupted file can be dealth with by using "unsigned". If there will be cases where it genuinely overflows, there is a disabled code to deal with that too. function old new delta get_next_block 1678 1667 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* whitespace and comment format fixes, no code changesDenys Vlasenko2017-10-055-8/+10
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* whitespace and comment format fixes, no code changesDenys Vlasenko2017-10-0527-37/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libarchive: fix build failure on NOMMU systemsRon Yorston2017-08-221-1/+1
| | | | | | | | In the old code fd was an argument, now we need to get the file descriptor from the xstate structure. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libarchive: do not extract unsafe symlinks unless $EXTRACT_UNSAFE_SYMLINKS=1Denys Vlasenko2017-08-103-22/+65
| | | | | | | | | | | | | function old new delta unsafe_symlink_target - 147 +147 unzip_main 2711 2732 +21 copy_file 1657 1678 +21 tar_main 999 971 -28 data_extract_all 1038 984 -54 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 2/2 up/down: 189/-82) Total: 107 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rpm2cpio: handle LZMA compressed rpms. closes 10166Denys Vlasenko2017-08-101-11/+27
| | | | | | | | | | | | | function old new delta rpm2cpio_main 78 120 +42 setup_lzma_on_fd - 29 +29 fork_transformer_and_free - 28 +28 ... setup_unzip_on_fd 56 32 -24 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 3/5 up/down: 104/-67) Total: 37 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unxz: get_le32 macro is obviously wrongDenys Vlasenko2017-08-071-1/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* tar: postpone creation of symlinks with "suspicious" targets. Closes 8411Denys Vlasenko2017-07-241-6/+36
| | | | | | | | | | | function old new delta data_extract_all 968 1038 +70 tar_main 952 986 +34 scan_tree 258 262 +4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 108/0) Total: 108 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Move get_unaligned_le32() macros to platform.hDenys Vlasenko2017-07-151-5/+11
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Spelling fixes in comments, documentation, tests and examplesDenys Vlasenko2017-04-172-3/+3
| | | | | | By klemens <ka7@github.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Fix FEATURE_{GZIP,BZIP2}_DECOMPRESS link errorKang-Che Sung2017-02-171-4/+4
| | | | | | | | | | | ... when gzip is selected but not gunzip nor zcat, or when bzip2 is selected but not bunzip2 nor bzcat. This regression is introduced in b130f9f758b6404c6d0911a1c120937ae6ab47f8 ("Allow 'gzip -d' and 'bzip2 -d' without gunzip or bunzip2") Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Replace int -> uint to avoid signed integer overflowRostislav Skudnov2017-02-041-3/+3
| | | | | | | | | | An example of such an error (should be compiled with DEBUG_SANITIZE): runtime error: left shift of 1 by 31 places cannot be represented in type 'int' Signed-off-by: Rostislav Skudnov <rostislav@tuxera.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* link: new appletDenys Vlasenko2017-01-261-2/+4
| | | | | | | | | | | | | | | | | | | coreutils grew itself a tiny simplistic alternative to ln: Usage: link FILE LINK Create hard LINK to FILE function old new delta link_main - 75 +75 packed_usage 31114 31131 +17 applet_names 2564 2569 +5 applet_main 1480 1484 +4 applet_install_loc 185 186 +1 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 4/0 up/down: 102/0) Total: 102 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unlzma: expand comments, no code changesDenys Vlasenko2017-01-091-0/+18
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unlzma: fix erroneous "while" instead of "if". Closes 4682Denys Vlasenko2017-01-091-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | These parts of the code essentially check whether stepping back by rep0 goes negative or not. LZMA SDK from lzma1604.7z has the following in the corresponding places: ... = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)] Clearly, not loop here. Technically, "while" here works: if condition is false (because pos underflowed), it iterates once, adds header.dict_size (a.k.a. dicBufSize), this makes pos positive but smaller than header.dict_size, and loop exits. Now we'll just check for negative result of subtraction, which is less code: function old new delta unpack_lzma_stream 2659 2641 -18 (I hope 2 Gbyte+ dictionaries won't be in use soon). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: optional support for xzDenys Vlasenko2017-01-091-0/+1
| | | | | | | function old new delta unzip_main 2476 2491 +15 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: optional support for bzip2 and lzmaDenys Vlasenko2017-01-091-0/+2
| | | | | | | | function old new delta unzip_main 2376 2476 +100 bbunpack 750 745 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* randomconfig fixesDenys Vlasenko2016-12-081-1/+8
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* tar: handle pax-encoded utf8 filenames and link names. Closes 9406Denys Vlasenko2016-11-111-7/+25
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* cpio: fix restoration of file ownership, closes 9306Denys Vlasenko2016-10-121-0/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libarchive: fix xmalloc_open_zipped_read_close()Denys Vlasenko2016-06-211-0/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* typo fixDenys Vlasenko2016-06-201-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libarchive: fix open_zipped()Denys Vlasenko2016-06-201-7/+12
| | | | | | Last commit broke it (on both MMU and NOMMU) Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libarchive: fix xmalloc_open_zipped_read_close() on NOMMUDenys Vlasenko2016-06-203-23/+18
| | | | | | | | | The somewhat new "unpack in memory" code was broken for xmalloc_open_zipped_read_close() on NOMMU: we seek back over signature, but then expect it to be already consumed. Stop seeking back in this case. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>