Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for writeBlockDynamic (0.18 sec)

  1. src/compress/flate/huffman_bit_writer.go

    }
    
    // writeBlockDynamic encodes a block using a dynamic Huffman table.
    // This should be used if the symbols used have a disproportionate
    // histogram distribution.
    // If input is supplied and the compression savings are below 1/16th of the
    // input size the block is stored.
    func (w *huffmanBitWriter) writeBlockDynamic(tokens []token, eof bool, input []byte) {
    	if w.err != nil {
    		return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 29 22:59:14 UTC 2022
    - 18.4K bytes
    - Viewed (0)
  2. src/compress/flate/huffman_bit_writer_test.go

    func TestWriteBlock(t *testing.T) {
    	for _, test := range writeBlockTests {
    		testBlock(t, test, "wb")
    	}
    }
    
    // TestWriteBlockDynamic tests if the writeBlockDynamic encoding has changed.
    // To update the reference files use the "-update" flag on the test.
    func TestWriteBlockDynamic(t *testing.T) {
    	for _, test := range writeBlockTests {
    		testBlock(t, test, "dyn")
    	}
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 09 19:12:23 UTC 2020
    - 40.3K bytes
    - Viewed (0)
  3. src/compress/flate/deflate.go

    	// If we removed less than 1/16th, Huffman compress the block.
    	if len(d.tokens) > d.windowEnd-(d.windowEnd>>4) {
    		d.w.writeBlockHuff(false, d.window[:d.windowEnd])
    	} else {
    		d.w.writeBlockDynamic(d.tokens, false, d.window[:d.windowEnd])
    	}
    	d.err = d.w.err
    	d.windowEnd = 0
    }
    
    func (d *compressor) initDeflate() {
    	d.window = make([]byte, 2*windowSize)
    	d.hashOffset = 1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:32:40 UTC 2024
    - 20.3K bytes
    - Viewed (0)
Back to top