Hash function without avalanche effect but with few collisions I am searching for a hash function which has these attributes:


low Avalanche Effect, similiar files should get similiar outputs
low number of collisions (if I have 0*10000 in one file, and 0*99999 + 1 in another the hash should differ and should not collide to easily)


The use case is "bruteforcing" a file hashed by the function, so I give a input file of 0*10000 and then bruteforce the input file. 

By reducing the avalanche effect I hope that I can speed up the process by analyzing the difference (fc5e038d38a57032085441e7fe7010b0 is the output hash of the original file and as my bruteforce gets near the original file the hash should have less and less difference like fc5e038d38a57032085441e7XXXXXXX)

Is this even mathematically possible? Wouldn't a hash with these properties lead to a ton of collisions especially when I bruteforce it?
Sure. The probability of collisions depends on:


How your symbols in the messages are distributed: Do messages have particular structure? Do some elements occur more often than the others?
How long the hash code is.
The structure of the hash code algorithm itself: Does it produce some hash codes more often than the others?


If all symbols are equally distributed and algorithm produces hash codes that are also equally distributed, then collision depends only on the hash code length. If hash code length is 512 bits, then the collision probability (with above mentioned assumptions) is $2^{-512}$.

The simplest function that fits your requirements is following:

hash(M) = M mod 2^512


If fits your requirements fully. To calculate it, you only need the last 64 bytes of the message. It means it is extremely fast. And the collision rate is the same as that of SHA-512.

If it is extremely fast, why nobody uses it? Namely because of your requirements: If has no avalanche effect. Hash codes are used normally to detect changes in the message. If there is no avalanche effect, changes will not be detected (in my example changes will be detected only in the last 64 bytes of the message, not in the previous bytes). I'm wondering for what purpose would you use such hash code.

To brute-forcing: If you exclude the avalanche effect, it means you will use only small part of the message to create the hash code. This means that also an attacker will consider only a small part of the message to brute-force. Means, brute-forcing will pretty easy.