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: find_stride.rs
    path of file: ./repos/rust-brotli/src/enc
    
    the code of the file until where you have to start completion: use super::super::alloc;
use super::super::alloc::{SliceWrapper, SliceWrapperMut};
use super::input_pair::{InputPair, InputReference};
use super::interface;
use s
    
    pub fn byte_index_to_pyramid_index(&self, byte_index: usize, metablock_size: usize) -> usize {
        let range = self.last_level_range();
        cmp::min(
            range.start + (range.end - range.start) * byte_index / metablock_size,
            range.end - 1,
        ) // since we tally after the end of the literal block, it could be after the pyramid
    }