Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (6 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.21.1
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/archival/gzip.c

    r2725 r3232  
    4040*/
    4141
     42//usage:#define gzip_trivial_usage
     43//usage:       "[-cfd] [FILE]..."
     44//usage:#define gzip_full_usage "\n\n"
     45//usage:       "Compress FILEs (or stdin)\n"
     46//usage:     "\n    -d  Decompress"
     47//usage:     "\n    -c  Write to stdout"
     48//usage:     "\n    -f  Force"
     49//usage:
     50//usage:#define gzip_example_usage
     51//usage:       "$ ls -la /tmp/busybox*\n"
     52//usage:       "-rw-rw-r--    1 andersen andersen  1761280 Apr 14 17:47 /tmp/busybox.tar\n"
     53//usage:       "$ gzip /tmp/busybox.tar\n"
     54//usage:       "$ ls -la /tmp/busybox*\n"
     55//usage:       "-rw-rw-r--    1 andersen andersen   554058 Apr 14 17:49 /tmp/busybox.tar.gz\n"
     56
    4257#include "libbb.h"
    43 #include "archive.h"
     58#include "bb_archive.h"
    4459
    4560
     
    6782/* ===========================================================================
    6883 */
    69 #define SMALL_MEM
     84#if   CONFIG_GZIP_FAST == 0
     85# define SMALL_MEM
     86#elif CONFIG_GZIP_FAST == 1
     87# define MEDIUM_MEM
     88#elif CONFIG_GZIP_FAST == 2
     89# define BIG_MEM
     90#else
     91# error "Invalid CONFIG_GZIP_FAST value"
     92#endif
    7093
    7194#ifndef INBUFSIZ
     
    11571180     */
    11581181    Assert(code + G2.bl_count[MAX_BITS] - 1 == (1 << MAX_BITS) - 1,
    1159            "inconsistent bit counts");
     1182            "inconsistent bit counts");
    11601183    Tracev((stderr, "\ngen_codes: max_code %d ", max_code));
    11611184
     
    15051528        out_length >>= 3;
    15061529        Trace((stderr,
    1507                "\nlast_lit %u, last_dist %u, in %ld, out ~%ld(%ld%%) ",
    1508                G2.last_lit, G2.last_dist, in_length, out_length,
    1509                100L - out_length * 100L / in_length));
     1530                "\nlast_lit %u, last_dist %u, in %ld, out ~%ld(%ld%%) ",
     1531                G2.last_lit, G2.last_dist, in_length, out_length,
     1532                100L - out_length * 100L / in_length));
    15101533        if (G2.last_dist < G2.last_lit / 2 && out_length < in_length / 2)
    15111534            return 1;
     
    15991622
    16001623    Trace((stderr,
    1601            "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u dist %u ",
    1602            opt_lenb, G2.opt_len, static_lenb, G2.static_len, stored_len,
    1603            G2.last_lit, G2.last_dist));
     1624            "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u dist %u ",
     1625            opt_lenb, G2.opt_len, static_lenb, G2.static_len, stored_len,
     1626            G2.last_lit, G2.last_dist));
    16041627
    16051628    if (static_lenb <= opt_lenb)
     
    16391662        send_bits((DYN_TREES << 1) + eof, 3);
    16401663        send_all_trees(G2.l_desc.max_code + 1, G2.d_desc.max_code + 1,
    1641                        max_blindex + 1);
     1664                    max_blindex + 1);
    16421665        compress_block((ct_data *) G2.dyn_ltree, (ct_data *) G2.dyn_dtree);
    16431666        G2.compressed_len += 3 + G2.opt_len;
     
    16591682/* ===========================================================================
    16601683 * Update a hash value with the given input byte
    1661  * IN  assertion: all calls to to UPDATE_HASH are made with consecutive
     1684 * IN  assertion: all calls to UPDATE_HASH are made with consecutive
    16621685 *    input characters, so that a running hash key can be computed from the
    16631686 *    previous key instead of complete recalculation each time.
     
    16901713 * of the hash chain (the most recent string with same hash key). Return
    16911714 * the previous length of the hash chain.
    1692  * IN  assertion: all calls to to INSERT_STRING are made with consecutive
     1715 * IN  assertion: all calls to INSERT_STRING are made with consecutive
    16931716 *    input characters and the first MIN_MATCH bytes of s are valid
    16941717 *    (except for the last MIN_MATCH-1 bytes of the input file). */
     
    19932016/* ======================================================================== */
    19942017static
    1995 IF_DESKTOP(long long) int FAST_FUNC pack_gzip(unpack_info_t *info UNUSED_PARAM)
     2018IF_DESKTOP(long long) int FAST_FUNC pack_gzip(transformer_aux_data_t *aux UNUSED_PARAM)
    19962019{
    19972020    struct stat s;
Note: See TracChangeset for help on using the changeset viewer.