MCPcopy Index your code
hub / github.com/RsyncProject/rsync / deflate_huff

Function deflate_huff

zlib/deflate.c:1939–1970  ·  view source on GitHub ↗

=========================================================================== * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. * (It will be regenerated if this run of deflate switches away from Huffman.) */

Source from the content-addressed store, hash-verified

1937 * (It will be regenerated if this run of deflate switches away from Huffman.)
1938 */
1939local block_state deflate_huff(deflate_state *s, int flush)
1940{
1941 int bflush; /* set if current block must be flushed */
1942
1943 for (;;) {
1944 /* Make sure that we have a literal to write. */
1945 if (s->lookahead == 0) {
1946 fill_window(s);
1947 if (s->lookahead == 0) {
1948 if (flush == Z_NO_FLUSH)
1949 return need_more;
1950 break; /* flush the current block */
1951 }
1952 }
1953
1954 /* Output a literal byte */
1955 s->match_length = 0;
1956 Tracevv((stderr,"%c", s->window[s->strstart]));
1957 _tr_tally_lit (s, s->window[s->strstart], bflush);
1958 s->lookahead--;
1959 s->strstart++;
1960 if (bflush) FLUSH_BLOCK(s, 0);
1961 }
1962 s->insert = 0;
1963 if (flush == Z_FINISH) {
1964 FLUSH_BLOCK(s, 1);
1965 return finish_done;
1966 }
1967 if (s->sym_next)
1968 FLUSH_BLOCK(s, 0);
1969 return block_done;
1970}

Callers 1

deflateFunction · 0.85

Calls 1

fill_windowFunction · 0.85

Tested by

no test coverage detected