You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: block_splitter_literal.go
    path of file: ./repos/trickster/vendor/github.com/andybalholm/brotli
    
    the code of the file until where you have to start completion: package brotli

import "math"

/* Copyright 2013 Google Inc. All Rights Reserved.

   Distributed under MIT license.
   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/


    
func refineEntropyCodesLiteral(data []byte, length uint, stride uint, num_histograms uint, histograms []histogramLiteral) {
	var iters uint = kIterMulForRefining*length/stride + kMinItersForRefining
	var seed uint32 = 7
	var iter uint
	iters = ((iters + num_histograms - 1) / num_histograms) * num_histograms
	for iter = 0; iter < iters; iter++ {
		var sample histogramLiteral
		histogramClearLiteral(&sample)
		randomSampleLiteral(&seed, data, length, stride, &sample)
		histogramAddHistogramLiteral(&histograms[iter%num_histograms], &sample)
	}
}