Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for newDeflateFast (0.15 sec)

  1. src/compress/flate/deflatefast.go

    // and the previous byte block for cross block matching.
    type deflateFast struct {
    	table [tableSize]tableEntry
    	prev  []byte // Previous block, zero length if unknown.
    	cur   int32  // Current match offset.
    }
    
    func newDeflateFast() *deflateFast {
    	return &deflateFast{cur: maxStoreBlockSize, prev: make([]byte, 0, maxStoreBlockSize)}
    }
    
    // encode encodes a block given in src and appends tokens
    // to dst and returns the result.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 19 18:48:17 UTC 2020
    - 9.4K bytes
    - Viewed (0)
  2. src/compress/flate/deflate.go

    	case level == BestSpeed:
    		d.compressionLevel = levels[level]
    		d.window = make([]byte, maxStoreBlockSize)
    		d.fill = (*compressor).fillStore
    		d.step = (*compressor).encSpeed
    		d.bestSpeed = newDeflateFast()
    		d.tokens = make([]token, maxStoreBlockSize)
    	case level == DefaultCompression:
    		level = 6
    		fallthrough
    	case 2 <= level && level <= 9:
    		d.compressionLevel = levels[level]
    		d.initDeflate()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:32:40 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  3. src/compress/flate/deflate_test.go

    		}
    	}
    }
    
    func TestBestSpeedShiftOffsets(t *testing.T) {
    	// Test if shiftoffsets properly preserves matches and resets out-of-range matches
    	// seen in https://github.com/golang/go/issues/4142
    	enc := newDeflateFast()
    
    	// testData may not generate internal matches.
    	testData := make([]byte, 32)
    	rng := rand.New(rand.NewSource(0))
    	for i := range testData {
    		testData[i] = byte(rng.Uint32())
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 14 00:03:57 UTC 2023
    - 25.6K bytes
    - Viewed (0)
Back to top