VirtualBox

Ignore:
Timestamp:
Jun 9, 2022 9:09:44 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
151769
Message:

libs/zlib: Upgrade to 1.2.12, bugref:8515

Location:
trunk/src/libs/zlib-1.2.12
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/zlib-1.2.12

    • Property svn:mergeinfo
      •  

        old new  
        2020/branches/dsen/gui3/src/libs/zlib-1.2.11:79645-79692
        2121/trunk/src/src/libs/zlib-1.2.11:92342
         22/vendor/zlib/1.2.12:151751
         23/vendor/zlib/current:150724-151750
  • trunk/src/libs/zlib-1.2.12/deflate.h

    r76163 r95239  
    11/* deflate.h -- internal compression state
    2  * Copyright (C) 1995-2016 Jean-loup Gailly
     2 * Copyright (C) 1995-2018 Jean-loup Gailly
    33 * For conditions of distribution and use, see copyright notice in zlib.h
    44 */
     
    218218     */
    219219
    220     uchf *l_buf;          /* buffer for literals or lengths */
     220    uchf *sym_buf;        /* buffer for distances and literals/lengths */
    221221
    222222    uInt  lit_bufsize;
     
    240240     */
    241241
    242     uInt last_lit;      /* running index in l_buf */
    243 
    244     ushf *d_buf;
    245     /* Buffer for distances. To simplify the code, d_buf and l_buf have
    246      * the same number of elements. To use different lengths, an extra flag
    247      * array would be necessary.
    248      */
     242    uInt sym_next;      /* running index in sym_buf */
     243    uInt sym_end;       /* symbol table full when sym_next reaches this */
    249244
    250245    ulg opt_len;        /* bit length of current block with optimal trees */
     
    326321# define _tr_tally_lit(s, c, flush) \
    327322  { uch cc = (c); \
    328     s->d_buf[s->last_lit] = 0; \
    329     s->l_buf[s->last_lit++] = cc; \
     323    s->sym_buf[s->sym_next++] = 0; \
     324    s->sym_buf[s->sym_next++] = 0; \
     325    s->sym_buf[s->sym_next++] = cc; \
    330326    s->dyn_ltree[cc].Freq++; \
    331     flush = (s->last_lit == s->lit_bufsize-1); \
     327    flush = (s->sym_next == s->sym_end); \
    332328   }
    333329# define _tr_tally_dist(s, distance, length, flush) \
    334330  { uch len = (uch)(length); \
    335331    ush dist = (ush)(distance); \
    336     s->d_buf[s->last_lit] = dist; \
    337     s->l_buf[s->last_lit++] = len; \
     332    s->sym_buf[s->sym_next++] = dist; \
     333    s->sym_buf[s->sym_next++] = dist >> 8; \
     334    s->sym_buf[s->sym_next++] = len; \
    338335    dist--; \
    339336    s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
    340337    s->dyn_dtree[d_code(dist)].Freq++; \
    341     flush = (s->last_lit == s->lit_bufsize-1); \
     338    flush = (s->sym_next == s->sym_end); \
    342339  }
    343340#else
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette