pub fn trim_bytecode(bytecode_hash: BytecodeHash, raw: &[u8]) -> anyhow::Result<&[u8]> {
    match bytecode_hash.marker() {
        BytecodeMarker::EraVm => Ok(raw),
        BytecodeMarker::Evm => trim_padded_evm_bytecode(bytecode_hash, raw),
    }
}
Removes padding from the bytecode, if necessary.
core/lib/basic_types/src/bytecode.rs